Skip to content

Support double-tap-drag on text fields #23973

Closed

Description

@xster

On Android, a double tap drag moves the cursor on first tap and the drag expands the selection through the drag.

On iOS, a double tap drag moves the cursor on the first tap but then just scrolls. However, a double tap hold drag has the same effect as Android with a text selection magnifier lens.

Activity

  1. added
    a: text inputEntering text in a text field or keyboard related problems
    platform-androidAndroid applications specifically
    platform-iosiOS applications specifically
    on Nov 6, 2018
  2. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    on Dec 11, 2018
  3. added this to the milestone on Dec 11, 2018
  4. xster commented on Jan 7, 2019

    @xster
    MemberAuthor

    on Android and iOS, reminder to move the toolbar show from double-tap-hold-down to double-tap-hold-up

  5. S60bishoyhanna commented on Mar 12, 2019

    @S60bishoyhanna

    I can see CupertinoTextField missing main IOS textfield features

    • where is the lens? it should appear when hold tapping
    • In IOS, when u tab one tap on the cursor it, shows the buble (copy,paste,select,select all) but in flutter u have to hold taping a while to show that menu
  6. added
    P2Important issues not at the top of the work list
    on May 29, 2020
  7. removed their assignment
    on Jun 19, 2020
  8. removed this from the milestone on Aug 17, 2020
  9. Renzo-Olivares commented on Jan 5, 2023

    @Renzo-Olivares
    Contributor

    Closed by #117502

  10. simplenotezy commented on Feb 27, 2023

    @simplenotezy

    @Renzo-Olivares / @xster I've been reading a few different older issues on this, however, I cannot get consistent behaviour with the "double tap word to select it".

    With a simple widget like this:

    CupertinoTextField(
                        minLines: 1,
                        maxLines: 7,
                        keyboardType: TextInputType.multiline,
                      )

    Nothing happens when double pressing a word. I cannot get the "Select" toolbar option.

    Not sure if I should create a new separate issue on this, or if I am misunderstanding something.

  11. Renzo-Olivares commented on Feb 27, 2023

    @Renzo-Olivares
    Contributor

    Hi @simplenotezy I tried this on the master branch and it works for me.

    import 'package:flutter/cupertino.dart';
    import 'package:flutter/material.dart';
    
    void main() {
      runApp(const MainApp());
    }
    
    class MainApp extends StatelessWidget {
      const MainApp({super.key});
    
      @override
      Widget build(BuildContext context) {
        return const MaterialApp(
          home: Scaffold(
            body: Center(
              child: CupertinoTextField(
                minLines: 1,
                maxLines: 7,
                keyboardType: TextInputType.multiline,
              ),
            ),
          ),
        );
      }
    }

    Using the iOS simulator. What device are you using?

    Screen.Recording.2023-02-27.at.9.41.22.AM.mov

    I think it might be better to create a new issue though if this is a problem.

  12. github-actions commented on Mar 13, 2023

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  13. locked as resolved and limited conversation to collaborators on Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: text inputEntering text in a text field or keyboard related problemsc: new featureNothing broken; request for a new capabilityframeworkflutter/packages/flutter repository. See also f: labels.platform-androidAndroid applications specificallyplatform-iosiOS applications specifically

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions