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

[cp:stable][web] Work around wrong pointerId in coalesced events in iOS Safari 18.2 (#56719) #56903

Open
wants to merge 1 commit into
base: flutter-3.24-candidate.0
Choose a base branch
from

Conversation

mdebbar
Copy link
Contributor

@mdebbar mdebbar commented Dec 2, 2024

Manual cherry pick for #56719

Cherrypick request: flutter/flutter#159691

…ri 18.2 (flutter#56719)

In iOS 18.2, Safari [added support](https://developer.apple.com/documentation/safari-release-notes/safari-18_2-release-notes#Web-API) for the [`getCoalescedEvents`](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/getCoalescedEvents) API.

That being said, the API seems to be incomplete (or at least doesn't match other browsers' behavior). The coalesced events lack a [`pointerId`](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pointerId) and [`target`](https://developer.mozilla.org/en-US/docs/Web/API/Event/target) properties.

I'm not sure if this issue will be fixed in the stable release of iOS 18.2, so in the meantime, this PR implements a workaround to avoid this issue.

Fixes flutter/flutter#158299
Fixes flutter/flutter#155987
@github-actions github-actions bot added the platform-web Code specifically for the web engine label Dec 2, 2024
@mdebbar mdebbar changed the title [cp][web] Work around wrong pointerId in coalesced events in iOS Safari 18.2 (#56719) [cp:stable][web] Work around wrong pointerId in coalesced events in iOS Safari 18.2 (#56719) Dec 2, 2024
Copy link
Member

@ditman ditman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for cherry-picking this fix!

@PedroAlvarado
Copy link

PedroAlvarado commented Dec 4, 2024

Allow me share that we have tens of users running into this issue. Thank you implementing a workaround! We look forward to seeing this change in 3.24.6!

@CadenaMike
Copy link

Thank you implementing a workaround! We look forward to seeing this change in 3.24.6!

Couldn't agree more! We have a lot of iOS users and 18.2 may be out as early as next week!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform-web Code specifically for the web engine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants