-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
Getting GestureRecognizers to respect each other #107671
Comments
@Hixie - I thought you might know the answer to this. I know that you and I have discussed the gesture arena in the past. |
I don't understand. What exactly doesn't work? Can you create a reduced test case that demonstrates the case you expect to work, that doesn't? |
The test in the linked PR is pretty reduced. The test fails because the gesture that's supposed to ONLY open a context menu, also places the caret within the text field. Thus, both gesture detectors are handling the same gesture. |
i meant reduced to just importing |
This particular use-case is using a custom gesture recognizer in our text field to recognize series of taps: single, double, triple. So I can't provide a vanilla Flutter example without possibly changing the nature of the bug. |
Labeling it for better tracking and for continued discussion on this case. |
@matthew-carroll what i mean is an example of what you're trying to do. Presumably there's a particular configuration of GestureDetectors and widgets/renderobjects that doesn't do what you want? |
The |
In super_editor, we're trying to add support to
SuperTextField
on desktop to allow arbitrary gesture interactions on top of the text field. For example, an app should be able to implementALT + LEFT CLICK
to open a context menu.Currently, this is a challenge because we can't seem to prevent both the app-level gestures and the
SuperTextField
internal gestures from both responding to user interactions. I have a PR that illustrates our attempt to do this: superlistapp/super_editor#692FYI - There's a test in the PR that's currently failing. That should demonstrate the issue.
I think we need the insight of the Flutter team to determine if there's presently a mechanism that would allow these two
GestureRecognizer
s to cooperate in the gesture arena, or whether this use-case is impossible with the current gesture system.The text was updated successfully, but these errors were encountered: