I'm having an issue with Flutter Web's TextField. Whenever The text becomes too long, and thus causes the TextField to scroll over to view it all (in single line fields), I am no longer able to click-and-drag to select the text. When the text is shorter, the selection is fine. You can see that with the GIF attached here:
I assume it has something to do with the order of gesture capturing being wrong, but I haven't been able to find a way to fix it.
According to a few people on this github issue, one solution to problems with text selection is to use one of the two following commands:
flutter run -d chrome --release --dart-define=FLUTTER_WEB_USE_SKIA=true
flutter run -d chrome --release --dart-define=FLUTTER_WEB_USE_EXPERIMENTAL_CANVAS_TEXT=true
Although the issue is for multi-line text fields, and unfortunately neither seems to solve my issue.
I've tried using a multi-line text box, though if I set maxLines
to a fixed number like 5, I get a similar problem with vertical scrolling and selection.
I've thought about using an html rendering plugin such as flutter_html
to just render a text field that way, but I'd like to avoid doing that if it's at all possible.