I noticed that the component does not react if you change scrollDisabled while the modal is open (example use case: I have an exit animation for the modal, so it doesn't unmount right away, but would like to allow the user to start scrolling as soon as they've clicked to dismiss the modal).
So I fixed it :)
I also moved the noScroll.on() call to componentDidMount from componentWillMount(); rumor has it that dong any sorts of side effects in componentWillMount() will be aggressively deprecated soon. It also seemed to fix a bug I've observed in my implementation where if you close a modal and open a new one right away, noScroll would be deactivated.
I noticed that the component does not react if you change
scrollDisabled
while the modal is open (example use case: I have an exit animation for the modal, so it doesn't unmount right away, but would like to allow the user to start scrolling as soon as they've clicked to dismiss the modal).So I fixed it :)
I also moved the
noScroll.on()
call tocomponentDidMount
fromcomponentWillMount()
; rumor has it that dong any sorts of side effects incomponentWillMount()
will be aggressively deprecated soon. It also seemed to fix a bug I've observed in my implementation where if you close a modal and open a new one right away,noScroll
would be deactivated.