react-native/Libraries/ReactIOS/ReactIOSGlobalResponderHandler.js

22 lines
511 B
JavaScript
Raw Normal View History

2015-01-29 17:10:49 -08:00
/**
* @providesModule ReactIOSGlobalResponderHandler
*/
'use strict';
var RCTUIManager = require('NativeModules').UIManager;
2015-01-29 17:10:49 -08:00
var ReactIOSTagHandles = require('ReactIOSTagHandles');
var ReactIOSGlobalResponderHandler = {
onChange: function(from, to) {
if (to !== null) {
RCTUIManager.setJSResponder(
2015-01-29 17:10:49 -08:00
ReactIOSTagHandles.mostRecentMountedNodeHandleForRootNodeID(to)
);
} else {
RCTUIManager.clearJSResponder();
2015-01-29 17:10:49 -08:00
}
}
};
module.exports = ReactIOSGlobalResponderHandler;