react-modal
react-modal copied to clipboard
[BUG] ReactModal__Body--open not removed when using css animation, and "fast click" on modal trigger button
Summary:
When css animation added and open modal with toggle button, and then I'm doing like "fast click" on the trigger button, ReactModal__Body--open will not removed from the body

Expected behavior:
The ReactModal__Body--open class would removed from the body though "fast click" the trigger button
Link to example of issue:
https://codepen.io/firzx77/pen/PrZOEY
Any update on this issue ?, In my case when I'm immediately opening another modal after closing the other one, ReactModal__Body--open does not get removed from body.classList
@firzx77 @anshulsahni This seems to be the case where the modal didn't have enough time to go ahead and remove the classes. Internally, it cancels the scheduled clean up function and act as if was kept open and finish the animation from where it was left.
See https://github.com/reactjs/react-modal/blob/master/src/components/ModalPortal.js#L198 https://github.com/reactjs/react-modal/blob/master/src/components/ModalPortal.js#L199.
Hope this can clarify.
Same here.