diff --git a/Libraries/Components/View/ReactNativeViewViewConfig.js b/Libraries/Components/View/ReactNativeViewViewConfig.js index aa708ddb39a401..6406b6ec7f2c0e 100644 --- a/Libraries/Components/View/ReactNativeViewViewConfig.js +++ b/Libraries/Components/View/ReactNativeViewViewConfig.js @@ -104,6 +104,15 @@ const ReactNativeViewConfig: ViewConfig = { topMagicTap: { registrationName: 'onMagicTap', }, + topPointerEnter: { + registrationName: 'pointerenter', + }, + topPointerLeave: { + registrationName: 'pointerleave', + }, + topPointerMove: { + registrationName: 'pointermove', + }, // Events for react-native-gesture-handler (T45765076) // Remove once this library can handle JS View Configs onGestureHandlerEvent: { @@ -192,6 +201,9 @@ const ReactNativeViewConfig: ViewConfig = { onAccessibilityAction: true, onAccessibilityEscape: true, onAccessibilityTap: true, + pointerenter: true, + pointerleave: true, + pointermove: true, onLayout: true, onMagicTap: true, opacity: true, diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/LayoutShadowNode.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/LayoutShadowNode.java index 5c6a7bff7d9024..61f0c18eeb1e92 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/LayoutShadowNode.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/LayoutShadowNode.java @@ -807,4 +807,22 @@ public void setPosition(@Nullable String position) { public void setShouldNotifyOnLayout(boolean shouldNotifyOnLayout) { super.setShouldNotifyOnLayout(shouldNotifyOnLayout); } + + @ReactProp(name = "pointerenter") + public void setShouldNotifyPointerEnter(boolean value) { + // This method exists to inject Native View configs in RN Android VR + // DO NOTHING + } + + @ReactProp(name = "pointerleave") + public void setShouldNotifyPointerLeave(boolean value) { + // This method exists to inject Native View configs in RN Android VR + // DO NOTHING + } + + @ReactProp(name = "pointermove") + public void setShouldNotifyPointerMove(boolean value) { + // This method exists to inject Native View configs in RN Android VR + // DO NOTHING + } } diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModuleConstants.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModuleConstants.java index 759df363a1c3cb..5f3d1697dbea16 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModuleConstants.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModuleConstants.java @@ -59,6 +59,9 @@ return MapBuilder.builder() .put("topContentSizeChange", MapBuilder.of(rn, "onContentSizeChange")) .put("topLayout", MapBuilder.of(rn, "onLayout")) + .put("topPointerEnter", MapBuilder.of(rn, "pointerenter")) + .put("topPointerLeave", MapBuilder.of(rn, "pointerleave")) + .put("topPointerMove", MapBuilder.of(rn, "pointermove")) .put("topLoadingError", MapBuilder.of(rn, "onLoadingError")) .put("topLoadingFinish", MapBuilder.of(rn, "onLoadingFinish")) .put("topLoadingStart", MapBuilder.of(rn, "onLoadingStart"))