Open Wissperwind opened 3 years ago
This behavior doesn't seem to be specific to web, since, on desktop too, same case occurs and as per this comment, text is not selectable by default in Flutter. You may try to use SelectTableText
and see if it helps to achieve your requirement.
Hi, In this case we are looking at editable text (TextField). Not read only text. This should be selectable.
[√] Flutter (Channel beta, 2.2.0, on Microsoft Windows [versão 10.0.19042.985], locale pt-BR)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
X Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.8.3)
[√] Android Studio (version 4.1.0)
[√] VS Code (version 1.56.2)
[√] Connected device (3 available)
! Doctor found issues in 1 category.
On windows build:
See, if I try select and swipe to up/down, the scroll in text field dont move, If I scroll manual in mouse, the select will go deselect:
Thanks for the details. I see the same behavior, ie, the text in the Editable text or TextField isn't selectable using cursor / trackpad / mouse if the text in it is more than the length of the Field, as shown below:
If the text in the field is inside the length of the field, the text is selectable, as below:
This behavior occurs on desktop too.
Thanks for the details. I see the same behavior, ie, the text in the Editable text or TextField isn't selectable using cursor / trackpad / mouse if the text in it is more than the length of the Field, as shown below:
Screen.Recording.2021-06-11.at.12.11.05.PM.mov If the text in the field is inside the length of the field, the text is selectable, as below:
Screen.Recording.2021-06-11.at.12.12.13.PM.mov This behavior occurs on desktop too.
flutter doctor -v
See my comment when textfield has multilines, I can even select but it will deselect itself when scrolling the scroll
It seems to be fixed in "Channel master, 2.3.0-17.0.pre.345" Can someone verify this? But there is still a problem: If you start selecting and move your courser to the right, over the border, you expect that the text scrolls automatically and you can select to the end. But that is missing. Shall I open a new issue for this?
I believe this was fixed by @jonahwilliams' fix for mouse drags inside scrollables. Autoscrolling during selection is probably not implemented in the framework. I'm going to relabel it as a framework issue.
/cc @goderbauer feel free to decide if you'd like a separate issue for scroll while selecting
In case it's helpful, a workaround we've been using for this issue is setting the scrollPhysics
on the TextField to NeverScrollableScrollPhysics
.
It's not ideal since our users can't see the text that overflows the TextField, but it's better than the alternative (for us).
I have been having this same issue where horizontal edge scrolling is not possible within the text field when dragging to select text that exceeds the length of the TextField viewport. It seems as if the text is still selected, but without any scroll to see what is selected. Has anyone found a workaround for this?
I have been having this same issue where horizontal edge scrolling is not possible within the text field when dragging to select text that exceeds the length of the TextField viewport. It seems as if the text is still selected, but without any scroll to see what is selected. Has anyone found a workaround for this?
Selecting text with a mouse and horizontally scrolling with a trackpad at the same time seems to do the trick, but that is not a solution.
I'm stuck with this problem right now. My client told me that the text input was not cool. Any chance of a solution? I work around it by specifying "maxLines: null" for now, but it can make the UI less cool.
The triaged-desktop
label is irrelevant if there is no team-desktop
label or fyi-desktop
label.
If the text in a TextField is too long, I can't select it. Problem is in Flutter WEB. Try too select "Hi". -> No problem. But try to select text in the TextField with the long text. -> not possible.