mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
[ReactNative] Block native from becoming js responder
This commit is contained in:
@@ -15,10 +15,11 @@ var RCTUIManager = require('NativeModules').UIManager;
|
||||
var ReactNativeTagHandles = require('ReactNativeTagHandles');
|
||||
|
||||
var ReactNativeGlobalResponderHandler = {
|
||||
onChange: function(from: string, to: string) {
|
||||
onChange: function(from: string, to: string, blockNativeResponder: boolean) {
|
||||
if (to !== null) {
|
||||
RCTUIManager.setJSResponder(
|
||||
ReactNativeTagHandles.mostRecentMountedNodeHandleForRootNodeID(to)
|
||||
ReactNativeTagHandles.mostRecentMountedNodeHandleForRootNodeID(to),
|
||||
blockNativeResponder
|
||||
);
|
||||
} else {
|
||||
RCTUIManager.clearJSResponder();
|
||||
|
||||
Reference in New Issue
Block a user