Skip to content
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 other places that use clientX/Y rather than offsetX/Y (text input?, semantics helper?) #116561

Open
ditman opened this issue Dec 6, 2022 · 1 comment
Labels
engine flutter/engine repository. See also e: labels. P2 Important issues not at the top of the work list platform-web Web applications specifically team-web Owned by Web platform team triaged-web Triaged by Web platform team

Comments

@ditman
Copy link
Member

ditman commented Dec 6, 2022

So far, these are the places that I've found that aren't using the correct coordinates for the events they're handling (they'd only work in full-screen mode):

pointer_binding.dart

In the pointer_binding, it seems that 'pointerup' events are incorrectly attached to domWindow. Those should be attached to the glassPane. See:

(There's probably a need to synthesize a 'pointercancel' event if there's a pointerup detected OUTSIDE of the glassPane too!)

text_field.dart

See:

(and below)

semantics_helper.dart

See:

(Using client coordinates rather than offset. Note that for touch events, there's no "offset" and it needs to be computed from the clientBoundingRect of the event target!)

@ditman ditman self-assigned this Dec 6, 2022
@ditman ditman added engine flutter/engine repository. See also e: labels. platform-web Web applications specifically P2 Important issues not at the top of the work list labels Dec 6, 2022
@flutter-triage-bot flutter-triage-bot bot added multiteam-retriage-candidate team-web Owned by Web platform team triaged-web Triaged by Web platform team labels Jul 8, 2023
@htoor3 htoor3 removed their assignment Feb 26, 2024
@ditman ditman removed their assignment Feb 29, 2024
@ditman
Copy link
Member Author

ditman commented Jul 16, 2024

Some of the pointer binding TODOs link here. For those related to "not using the _globalTarget". For embedded mode, all events are already rooted in the flutter-view, but for full page we're still using "window".

Flutter should setPointerCapture() on pointerdown to the flutter view element, and let the browser do its thing, instead of listening from two different event sources. See Pointer events > pointer capture in MDN.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engine flutter/engine repository. See also e: labels. P2 Important issues not at the top of the work list platform-web Web applications specifically team-web Owned by Web platform team triaged-web Triaged by Web platform team
Projects
None yet
Development

No branches or pull requests

3 participants