react-modal
react-modal copied to clipboard
Prevent Address Bar Resize (Android)
Summary:
The user can't scroll on the body, but when the user scrolls there is an issue with the modal. The screen gets resized and the modal doesn't fill all the screen for a second.
More info here: https://imgur.com/a/wS3903x
This is how my code looks like:
<ReactModal
onAfterOpen={() => document.body.style.overflow = 'hidden'}
onAfterClose={() => document.body.style.overflow = 'unset'}
...other props
/>
Additional notes:
This issue only happens on Android.
Any idea how to fix it?