diff --git a/Libraries/Modal/Modal.js b/Libraries/Modal/Modal.js index b1cc4a1cb7b..52ed8c7a2b9 100644 --- a/Libraries/Modal/Modal.js +++ b/Libraries/Modal/Modal.js @@ -129,6 +129,18 @@ class Modal extends React.Component { this._identifier = uniqueModalIdentifier++; } + static childContextTypes = { + virtualizedList: PropTypes.object, + }; + + getChildContext() { + // Reset the context so VirtualizedList doesn't get confused by nesting + // in the React tree that doesn't reflect the native component heirarchy. + return { + virtualizedList: null, + }; + } + componentDidMount() { if (ModalEventEmitter) { this._eventSubscription = ModalEventEmitter.addListener(