- Notifications
You must be signed in to change notification settings - Fork 6k
[web] Use eventTarget when computing pointer offset #56949
Conversation
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.
Ship it! Thanks for fixing the computeOffset!
| final EditableTextGeometry? inputGeometry = textEditing.strategy.geometry; | ||
| if (inputGeometry != null) { | ||
| return _computeOffsetForInputs(event, inputGeometry); | ||
| return _computeOffsetForInputs(event, eventTarget, inputGeometry); |
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.
From the docs:
This needs an
eventTarget, because theevent.target(which is what this would really need to use) gets lost when theeventcomes from a "coalesced" event (see: flutter/flutter#155987).
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.
I'll update the docs. The problem I'm seeing in Chrome is actually quite interesting:
The main event has the correct target (input). But the coalesced events have a dummy div as their targets. When I set a breakpoint in Chrome and try to inspect that div, Chrome freezes!
I filed a Chrome bug for it: https://g-issues.chromium.org/issues/382473107
…159858) flutter/engine@b4f52b2...3a8204a 2024-12-05 30870216+gaaclarke@users.noreply.github.com Moved gles pipelines to untracked handles. (flutter/engine#56955) 2024-12-05 skia-flutter-autoroll@skia.org Roll Dart SDK from a2a9428e761f to 56bbedca60f9 (7 revisions) (flutter/engine#56980) 2024-12-05 mdebbar@google.com [web] Use `eventTarget` when computing pointer offset (flutter/engine#56949) 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 bdero@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://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
These changes are mainly things I missed in flutter#56719 Fixes flutter/flutter#159804
…#56949) These changes are mainly things I missed in flutter/engine#56719 Fixes flutter#159804
Awaiting CP (flutter/engine#57246) of flutter/engine#56949 to stable.
Awaiting CP (flutter/engine#57246) of flutter/engine#56949 to stable.
Awaiting CP (flutter/engine#57246) of flutter/engine#56949 to stable.
Awaiting CP (flutter/engine#57246) of flutter/engine#56949 to stable.
Awaiting CP (flutter/engine#57246) of flutter/engine#56949 to stable.
Awaiting CP (flutter/engine#57246) of flutter/engine#56949 to stable.
Awaiting CP (flutter/engine#57246) of flutter/engine#56949 to stable.
These changes are mainly things I missed in #56719
Fixes flutter/flutter#159804