mirror of
https://github.com/status-im/react-native.git
synced 2025-01-16 20:44:10 +00:00
22 lines
511 B
JavaScript
22 lines
511 B
JavaScript
/**
|
|
* @providesModule ReactIOSGlobalResponderHandler
|
|
*/
|
|
'use strict';
|
|
|
|
var RCTUIManager = require('NativeModules').UIManager;
|
|
var ReactIOSTagHandles = require('ReactIOSTagHandles');
|
|
|
|
var ReactIOSGlobalResponderHandler = {
|
|
onChange: function(from, to) {
|
|
if (to !== null) {
|
|
RCTUIManager.setJSResponder(
|
|
ReactIOSTagHandles.mostRecentMountedNodeHandleForRootNodeID(to)
|
|
);
|
|
} else {
|
|
RCTUIManager.clearJSResponder();
|
|
}
|
|
}
|
|
};
|
|
|
|
module.exports = ReactIOSGlobalResponderHandler;
|