vodkabears / Remodal

No longer actively maintained.
http://vodkabears.github.io/remodal/
MIT License
2.75k stars 771 forks source link

Check if closed before closing. #246

Open nicekiwi opened 8 years ago

nicekiwi commented 8 years ago

If for whatever reason the close method is called on a remodal after it has already been closed. The closing event will trigger and wait for the closed event to fire, but as its already closed, this will never happen. So it will be stuck in the "closing" event state and will no longer work if a user tries to open it again.

nicekiwi commented 8 years ago

You can test this if you call the clode method inside a timeout function on the "opened" event, then close the modal manually before the timer function executes its function. One the timeout functions runs you can no longer open the modal at all.