Skip to content

Commit 838f546

Browse files
authored
Call correct onInterceptHoverEvent super in onInterceptHoverEvent() (#1260)
## 📜 Description Fix a copy/paste mistake in `OverKeyboardRootViewGroup.onInterceptHoverEvent`. The method incorrectly delegates to `super.onHoverEvent(event)` instead of `super.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 `onInterceptHoverEvent` is specifically intended to decide whether hover events should be intercepted before reaching child views. Calling `super.onHoverEvent` from 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 `onHoverEvent` already calls `super.onHoverEvent(event)`. `react-native` PR for reference: react/react-native#54991 ## 📢 Changelog ### Android * Fixed `onInterceptHoverEvent` to call `super.onInterceptHoverEvent(event)` instead of `super.onHoverEvent(event)`.
1 parent b5fb835 commit 838f546

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

android/src/main/java/com/reactnativekeyboardcontroller/views/overlay/OverKeyboardViewGroup.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ class OverKeyboardRootViewGroup(
197197
eventDispatcher?.let {
198198
jsPointerDispatcher?.handleMotionEventCompat(event, it, true)
199199
}
200-
return super.onHoverEvent(event)
200+
return super.onInterceptHoverEvent(event)
201201
}
202202

203203
override fun onHoverEvent(event: MotionEvent): Boolean {

0 commit comments

Comments
 (0)