Don't synthesize primary pointer button unless buttons = 0 #85808
+36
−7
Conversation
|
@dkwingsmt Can you take a look at this? |
|
The change is legit, but I have question for the test case. |
|
LGTM |
Only add the primary button if there are no buttons in the event TapGestureRecognizer doesn't work when the extra primary button is added to a secondary-button tap.
|
@moffatman Could you rebase this on top the latest master to get all the tests to pass? Thanks! |
|
@goderbauer Can you merge this now? |
Renzo-Olivares
added a commit
to Renzo-Olivares/flutter
that referenced
this pull request
Jul 22, 2021
…5808) Some embeddings might send pointer events with buttons = 0x2 (right-click) for touch or stylus device kinds. If the primary button is synthesized for those events, they won't behave properly. Without this change it's not possible to trigger "secondary tap" events on a TapGestureRecognizer while using a stylus or on an iPad trackpad, since that recognizer will receive buttons = 0x3.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.


Some embeddings might send pointer events with buttons = 0x2 (right-click) for touch or stylus device kinds. If the primary button is synthesized for those events, they won't behave properly. Without this change it's not possible to trigger "secondary tap" events on a TapGestureRecognizer while using a stylus or on an iPad trackpad, since that recognizer will receive buttons = 0x3.
Related:
flutter/engine#27019