Repository navigation
Call correct onInterceptHoverEvent super in onInterceptHoverEvent() - #1260
Merged
Merged
Conversation
kirillzyusko
self-requested a review
December 29, 2025 11:57
Owner
|
Thank you @MegaManSec for your PR! Let's wait for green CI and I'll merge it straight away! |
Contributor
📊 Package size report
|
Owner
|
Actually the same copy/paste error is present in Could you please confirm, that screen reader (with enabled accessibility) works fine with these changes? |
Contributor
Author
|
I didn't actually test these changes: it was picked up during a source code review. I will report this to facebook/react-native too, thank you. |
Owner
|
Okay, I'll test it then before merge 👍 For e2e tests I'm using detox, and this framework doesn't use a11y tree for testing (unlike Maestro, for example), so I'll conduct additional testing 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📜 Description
Fix a copy/paste mistake in
OverKeyboardRootViewGroup.onInterceptHoverEvent. The method incorrectly delegates tosuper.onHoverEvent(event)instead ofsuper.onInterceptHoverEvent(event), which bypasses the proper intercept path for hover events.This change updates the return statement to call the correct superclass method.
💡 Motivation and Context
onInterceptHoverEventis specifically intended to decide whether hover events should be intercepted before reaching child views. Callingsuper.onHoverEventfrom the intercept override is incorrect and can lead to inconsistent hover/pointer behavior (including accessibility/hover dispatch) compared to the expected ViewGroup event flow.This appears to be a straightforward copy/paste error given that
onHoverEventalready callssuper.onHoverEvent(event).react-nativePR for reference: react/react-native#54991📢 Changelog
Android
onInterceptHoverEventto callsuper.onInterceptHoverEvent(event)instead ofsuper.onHoverEvent(event).