New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Web - Fix selection jump on Chrome for Android #41202
Web - Fix selection jump on Chrome for Android #41202
Conversation
This pull request has been changed to a draft. The currently pending flutter-gold status will not be able to resolve until a new commit is pushed or the change is marked ready for review again. |
0d0446a
to
540e5e5
Compare
540e5e5
to
79f64a3
Compare
79f64a3
to
96a3dac
Compare
Thanks for doing the tweaks here! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change looks good to me, thanks for the contribution!
But I don't think it solves the linked issue. It only hides the symptom. Can this be done in IOSTextEditingStrategy
too?
96a3dac
to
025423d
Compare
@mdebbar Thank you for the review!
Do you have in mind another way to fix this? Because it might help to fix the iOS side.
This solution is not applicable on the iOS side because engine/lib/web_ui/lib/src/engine/text_editing/text_editing.dart Lines 1595 to 1625 in 40136ed
|
Well, that's a tricky issue that we've had for a while (see flutter/flutter#99918 and flutter/flutter#70841 for example). The only solution for it is to overhaul our text editing system (discussed in flutter/flutter#120613). |
…125909) flutter/engine@cd989fb...c4a2712 2023-05-02 leroux_bruno@yahoo.fr Web - Fix selection jump on Chrome for Android (flutter/engine#41202) 2023-05-02 skia-flutter-autoroll@skia.org Roll Dart SDK from 84f3080c3165 to ea1fce8e0aa7 (1 revision) (flutter/engine#41672) 2023-05-02 magder@google.com Stop specifiying Macmini8,1 in ci builders, use inherited mac_model dimension (flutter/engine#41223) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC jimgraham@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Description
This PR fixes cursor jump on Chrome for Android when the user taps in a multiline
TextField
.Using the following code sample:
Code sample
On a mobile browser, once the page is loaded, tap after the number 3:
Enregistrement.de.l.ecran.2023-04-14.a.15.03.16.mov
Implementation
A multiline
TextField
relies on an HTML<textarea>
elements. When a tap occurs the selection should be updated from Flutter not by the HTML element itself.This PR prevents mouse events on Chrome for Android. Those events conflicts with Flutter selection changes.
Previously, mouse events were only prevented on desktop but they are also emitted on mobile, see https://bugs.chromium.org/p/chromium/issues/detail?id=119216#c11.
Related Issue
Related to flutter/flutter#124483 (partial fix because the issue is also reproducible on iOS/Safari).
Tests
Adds 1 test.