-
Notifications
You must be signed in to change notification settings - Fork 6k
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:semantics] fix double click due to long-press #54735
[CP-stable][web:semantics] fix double click due to long-press #54735
Conversation
Remember the timestamp of _all_ `pointerup` events, not just those that were flushed. Clicks should be deduplicated after a `pointerup` even when not debouncing anything. This is because when not debouncing the engine already forwards all the pointer events to the framework, and sending click events on top only causes double-clicks. Fixes flutter/flutter#147050
@pedromassango please fill out the PR description above, afterwards the release team will review this request. |
@yjbanov do you think the impact of this bug/fix warrants a stable branch CP? |
I think this one should be safe to CP. However, let's do our due diligence and clearly justify the CP in the description. @pedromassango Could you please write up a justification for the CP? |
Updated the form, to add more details, internally we've a Flutter web app that strongly depends on semantics and disabling it is not an option, which means we can't apply the workaround mentioned in the OP (and here) |
…2d0c561ce65082e0736517d6d81cceb64
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.
f314ded
into
flutter:flutter-3.24-candidate.0
@yjbanov sorry for pocking, Is there an eta for the cherry-pick to land on stable? Had a look at the Flutter Cherry-pick Process and couldn't figure that out |
@pedromassango That is a good question for @itsjustkevin. The release schedule is driven not by the web platform, but by the needs of all platforms, and I'm not fully looped into what else is going on. If you need it really really soon, consider patching the version of the engine that you are currently using, and building a custom one. |
@pedromassango this cherry-pick has been merged, meaning that is in the queue for the next hotfix release. We aim to release hotfixes weekly where possible, but it is not a guarantee. If you need the fix immediately, I suggest following the callout by @yjbanov. |
I am glad the week is (almost) over then 🎉
The problem is just that that doesn't seems too trivial to do... is there any doc as a starting point? |
# Flutter stable 3.24.0 Framework ## Scheduled Cherrypicks [flutter/153949](#153949): Fix a crash when deleting text inside CupertinoPageRoute, with a CJK (chinese, japanese, korean) keyboard on Android. [flutter/153939](#153939): Fixes an issue where Flutter TextField may stop accepting input on iOS. [flutter/152420](#152420): Fixes scrolling jank when a SelectionArea/SelectableRegion is used as a child of a Scrollable like ListView or PageView on Android and iOS. [flutter/154199](#154199): Removes log spam when building a freshly created template app for Android. [flutter/153967](#153967): Fixes macOS host build failure when there are no native asset frameworks to codesign. Impacts users who have enabled experimental native assets feature. [flutter/153769](#153769): When running a Flutter app, display a concise error message when connection to the device is lost. [flutter/154270](#154270): Prevent preemptive gradle crash for android builds that would fail to build anyway but with a confusing error message. [flutter/54735](flutter/engine#54735): When semantics are enabled on Web, the onTap of various widgets (GestureDetector, InkWell) are called twice or the callback from one widget is called when another widget is pressed.
@yjbanov @pedromassango |
This pull request is created by automatic cherry pick workflow
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.
Issue Link:
What is the link to the issue this cherry-pick is addressing?
flutter/flutter#147050
Changelog Description:
Explain this cherry pick in one line that is accessible to most Flutter developers. See best practices for examples
When semantics are enabled on Web, the
onTap
of various widgets (GestureDetector
,InkWell
) are called twice or the callback from one widget is called when another widget is pressed.Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping production app (the app crashes on launch)
This causes multiple issues, e.g I have an
InputField
and aInkWell
within the same page, tapping on the InputField executes the callback of theInkWell
.Workaround:
Is there a workaround for this issue?
The workaround is to go through all clickable components and set
excludeFromSemantics: true
. Note that this is not always feasible when using external packages (those you don't have control over).Risk:
What is the risk level of this cherry-pick?
Test Coverage:
Are you confident that your fix is well-tested by automated tests?
Validation Steps:
What are the steps to validate that this fix works?
Steps to validate
Expected results
The on tap callback is called once and
onTap
is printed once on the console:Code sample
Code sample