Skip to content

Commit 6f77ed6

Browse files
committed
Mark JSPointerDispatcher and JSTouchDispatcher as open
The Java-to-Kotlin migration of these classes made them implicitly final (Kotlin default), breaking downstream libraries that subclass them (e.g. react-native-keyboard-controller's JSPointerDispatcherCompat). Adding `open` restores the pre-migration extensibility.
1 parent c789880 commit 6f77ed6

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/JSPointerDispatcher.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import com.facebook.react.uimanager.events.PointerEventHelper.EVENT
2828
* onHoverEvent, onInterceptHoverEvent. It will correctly find the right view to handle the touch
2929
* and also dispatch the appropriate event to JS
3030
*/
31-
public class JSPointerDispatcher(private val rootViewGroup: ViewGroup) {
31+
public open class JSPointerDispatcher(private val rootViewGroup: ViewGroup) {
3232

3333
private var lastHitPathByPointerId: MutableMap<Int, List<ViewTarget>>? = null
3434
private var lastEventCoordinatesByPointerId: MutableMap<Int, FloatArray>? = null

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/JSTouchDispatcher.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import com.facebook.react.uimanager.events.TouchEventType
2525
* need to call handleTouchEvent from onTouchEvent and onInterceptTouchEvent. It will correctly find
2626
* the right view to handle the touch and also dispatch the appropriate event to JS
2727
*/
28-
public class JSTouchDispatcher(private val viewGroup: ViewGroup) {
28+
public open class JSTouchDispatcher(private val viewGroup: ViewGroup) {
2929
private var targetTag = -1
3030
private val targetCoordinates = FloatArray(2)
3131
private var childIsHandlingNativeGesture = false

0 commit comments

Comments
 (0)