You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In iOS 13, long pressing on editable and non-editable text starts selecting. Dragging extends the selection. I think this is identical to Android now, so it should be easy for Flutter to support. Previously, long pressing and dragging on text set the cursor and showed the loupe magnifying glass.
This was shown at WWDC in this video around the 30:00 mark. I also confirmed this in the iOS 13 simulator.
@DanielEdrisian here's another one you could give a try. It's slightly more involved than the last one but should still be somewhat straightforward.
We already have some infrastructure to handle various combinations of gestures in textfields. #26001 has some example of the current behavior of long-press-dragging translating to moving a collapsed cursor. It seems like the new behavior is to select the current word and then expand the selection by letters.
I just double checked quickly but it seems unfortunately like the premise of the bug isn't correct anymore on the latest iOS version
On long-press-drag:
On double-tap-drag:
It seems like the default iOS behavior was closer to our current implementation now (though the long-press-drag now shows the cursor not bound to the textfield itself like the keyboard force-touch-press-drag magnifier). Did I hold it right?
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.
Activity
justinmc commentedon Jun 24, 2019
Tapping and dragging without waiting for a long press still drags the cursor around.
xster commentedon Apr 30, 2020
Seems like the same behavior as Android on #26394 now.
xster commentedon Sep 30, 2020
@DanielEdrisian here's another one you could give a try. It's slightly more involved than the last one but should still be somewhat straightforward.
We already have some infrastructure to handle various combinations of gestures in textfields. #26001 has some example of the current behavior of long-press-dragging translating to moving a collapsed cursor. It seems like the new behavior is to select the current word and then expand the selection by letters.
Part of the plumbing goes through
flutter/packages/flutter/lib/src/widgets/text_selection.dart
Line 1367 in 9ca15d0
onSingleLongTapMoveUpdate.You can get some ideas for possible options such as
flutter/packages/flutter/lib/src/material/selectable_text.dart
Line 75 in 9ca15d0
xster commentedon Dec 10, 2020
I just double checked quickly but it seems unfortunately like the premise of the bug isn't correct anymore on the latest iOS version
On long-press-drag:

On double-tap-drag:

It seems like the default iOS behavior was closer to our current implementation now (though the long-press-drag now shows the cursor not bound to the textfield itself like the keyboard force-touch-press-drag magnifier). Did I hold it right?
DanielEdrisian commentedon Dec 10, 2020
@xster I believe when the text isn't focused, long press and drag does text selection. Once it has focus it only selects a range in double tap drag.
xster commentedon Dec 10, 2020
Spoke offline. @DanielEdrisian is correct, it's different when focused vs non-focused.
github-actions commentedon Apr 12, 2023
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 -vand a minimal reproduction of the issue.