diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModuleConstantsHelper.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModuleConstantsHelper.java index 01acd5aebd2f34..6d0770447bfb90 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModuleConstantsHelper.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModuleConstantsHelper.java @@ -145,7 +145,6 @@ private static void validateDirectEventNames( Map viewManagerBubblingEvents = viewManager.getExportedCustomBubblingEventTypeConstants(); if (viewManagerBubblingEvents != null) { - if (ReactFeatureFlags.enableFabricRenderer && ReactFeatureFlags.unstable_useFabricInterop) { // For Fabric, events needs to be fired with a "top" prefix. // For the sake of Fabric Interop, here we normalize events adding "top" in their @@ -162,6 +161,12 @@ private static void validateDirectEventNames( Map viewManagerDirectEvents = viewManager.getExportedCustomDirectEventTypeConstants(); validateDirectEventNames(viewManager.getName(), viewManagerDirectEvents); if (viewManagerDirectEvents != null) { + if (ReactFeatureFlags.enableFabricRenderer && ReactFeatureFlags.unstable_useFabricInterop) { + // For Fabric, events needs to be fired with a "top" prefix. + // For the sake of Fabric Interop, here we normalize events adding "top" in their + // name if the user hasn't provided it. + normalizeEventTypes(viewManagerDirectEvents); + } recursiveMerge(cumulativeDirectEventTypes, viewManagerDirectEvents); recursiveMerge(viewManagerDirectEvents, defaultDirectEvents); viewManagerConstants.put(DIRECT_EVENTS_KEY, viewManagerDirectEvents);