This problem is related to #issue 191: Don't scroll parent component when Modal is opened
This problem now happens on iOS. Because the parent behind is getting scrolled. The modal sometimes appears unresponsive. I followed the recommendation using onAfterOpen callback like this:
<Modal
isOpen={open}
onRequestClose={this.handleCloseModal}
style={styles.modal}
contentLabel="Example Modal"
onAfterOpen={this.disableScroll}
>
in the same parent, i defined disableScroll:
disableScroll = () => {
document.body.style.overflow = 'hidden'
}
I also followed the css guidelines for ios:
parent: {
overflow: 'hidden',
position: 'absolute',
width: '100%',
height: '100%'},
Too bad this stops the scrolling for parent view when modal is closed too. Any idea how to resolve this on ios?