From 147c30853f419a1bfe0e6ca53185d27b3b765022 Mon Sep 17 00:00:00 2001 From: Joshua Gross Date: Mon, 15 Mar 2021 11:57:04 -0700 Subject: [PATCH] Revert 'Fabric-compatible implementation of feature' and have Fabric noop when setJSResponder is called for now --- .../src/ReactFabricGlobalResponderHandler.js | 8 +------- .../ReactPrivate/InitializeNativeFabricUIManager.js | 1 - scripts/flow/react-native-host-hooks.js | 1 - 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/packages/react-native-renderer/src/ReactFabricGlobalResponderHandler.js b/packages/react-native-renderer/src/ReactFabricGlobalResponderHandler.js index 12b6d1e92fcec..68a0b424ba34b 100644 --- a/packages/react-native-renderer/src/ReactFabricGlobalResponderHandler.js +++ b/packages/react-native-renderer/src/ReactFabricGlobalResponderHandler.js @@ -16,13 +16,7 @@ const ReactFabricGlobalResponderHandler = { const isFabric = !!fromOrTo.stateNode.canonical._internalInstanceHandle; if (isFabric) { - if (from) { - nativeFabricUIManager.setIsJSResponder(from.stateNode.node, false); - } - - if (to) { - nativeFabricUIManager.setIsJSResponder(to.stateNode.node, true); - } + // Noop for now until setJSResponder/clearJSResponder are supported in Fabric } else { if (to !== null) { const tag = to.stateNode.canonical._nativeTag; diff --git a/packages/react-native-renderer/src/__mocks__/react-native/Libraries/ReactPrivate/InitializeNativeFabricUIManager.js b/packages/react-native-renderer/src/__mocks__/react-native/Libraries/ReactPrivate/InitializeNativeFabricUIManager.js index ee3c7df98508d..686dc72702de9 100644 --- a/packages/react-native-renderer/src/__mocks__/react-native/Libraries/ReactPrivate/InitializeNativeFabricUIManager.js +++ b/packages/react-native-renderer/src/__mocks__/react-native/Libraries/ReactPrivate/InitializeNativeFabricUIManager.js @@ -176,7 +176,6 @@ const RCTFabricUIManager = { ); success(1, 1, 100, 100); }), - setIsJSResponder: jest.fn(), }; global.nativeFabricUIManager = RCTFabricUIManager; diff --git a/scripts/flow/react-native-host-hooks.js b/scripts/flow/react-native-host-hooks.js index 29fed27e52c6b..17cc6fe9c952e 100644 --- a/scripts/flow/react-native-host-hooks.js +++ b/scripts/flow/react-native-host-hooks.js @@ -179,7 +179,6 @@ declare var nativeFabricUIManager: { locationY: number, callback: (Fiber) => void, ) => void, - setIsJSResponder: (node: Node, isJsResponder: boolean) => void, ... };