Remodal icon indicating copy to clipboard operation
Remodal copied to clipboard

Check if modal has been closed once or destroyed

Open cvanderlinden opened this issue 8 years ago • 2 comments

I am looking for a way to see if the modal has already been closed once or .destroy() has been called.

I got around it by adding a classed on modal close, and the checking if the modal exists with that class, it's a little hacky. Wondering if there is a better option here.

cvanderlinden avatar Jul 13 '17 22:07 cvanderlinden

Check it in Remodal#methods and Remodal#events

yunusga avatar Jul 14 '17 05:07 yunusga

Right, I did. getState() can tell me when it's closed, but it will also say closed before it's been activated once. Events is what I use to add the CSS class I mentioned in the first comment. Doesn't help.

cvanderlinden avatar Jul 14 '17 05:07 cvanderlinden