Skip to content

[Android] Fix hover events recording gestures other than HoverGestureHandler#4220

Open
j-piasecki wants to merge 1 commit into
mainfrom
@jpiasecki/fix-android-extract-hover
Open

[Android] Fix hover events recording gestures other than HoverGestureHandler#4220
j-piasecki wants to merge 1 commit into
mainfrom
@jpiasecki/fix-android-extract-hover

Conversation

@j-piasecki
Copy link
Copy Markdown
Member

Description

extractAncestorHandlers was registering all handlers when triggered by a hover event, instead of only registering HoverGestureHandler instances. This caused Touchables to be canceled at the start when using Talkback (which dispatches hover events on focus) due to shouldBeginWithRecordedHandlers.

Test plan

Enable Talkback and try to activate any Touchable in the Expo Example main screen

Copilot AI review requested due to automatic review settings June 1, 2026 12:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes Android hover-event handler extraction so that hover events don’t incorrectly “record” non-hover gesture handlers (which could cancel Touchables when TalkBack dispatches hover events for focus), aligning ancestor-handler extraction behavior with existing per-view filtering.

Changes:

  • Updated extractAncestorHandlers to receive the MotionEvent.
  • Applied existing hover-event filtering (shouldHandlerSkipHoverEvents) while collecting handlers from ancestor views.
  • Updated the call site to pass through the event.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants