Repository navigation
Document event ordering for HitTestBehavior.translucent - #190163
auto-submit[bot] merged 7 commits into
Conversation
Add documentation to HitTestBehavior.translucent explaining which listener receives events first when both a translucent target and its descendant listen to the same pointer event. The descendant (most specific target) receives events first and typically wins gesture arena competitions. Fixes flutter#28170
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request adds documentation to HitTestBehavior.translucent explaining event dispatching and gesture arena competition behavior between translucent targets and their descendants. The review feedback suggests clarifying that a translucent target's gesture can still be invoked if the descendant's gesture is rejected or if they listen to different gestures, and provides a code suggestion to refine the explanation.
Address review feedback: the translucent target's gesture can still be invoked if the descendant's gesture is rejected, and scope the arena explanation to competitions for the same gesture.
5cbe284 to
af22870
Compare
Co-authored-by: Kate Lovett <[email protected]>
|
Thank you, @Piinks. Your suggestion has been applied. |
Description
Fixes #28170
This PR adds documentation to
HitTestBehavior.translucentexplaining which listener receives events first when both a translucent target and its descendant are listening to the same pointer event.Currently, the documentation for
translucentonly says that both targets receive events, but does not explain the ordering or how gesture arena competitions are resolved. This has been a source of confusion since issue #28170 was filed.Changes
HitTestBehavior.translucentexplaining that:HitTestResult.pathandGestureDetector.behaviorfor further readingPre-launch Checklist
///).Fixes #28170