-
Notifications
You must be signed in to change notification settings - Fork 668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Close button doesn't seem to work after 2nd time opening dialog #17
Comments
Note, this only seems to be when you don't specifically use the autodestroy: false option. Maybe this is the intended behavior? |
Hmm... this looks like a similar problem to this one: #10 Setting autodestroy to false to enable opening a same dialog multiple times is an intended behavior. |
See the description of option 'autodestroy' in the crude documentation here: http://nakupanda.github.io/bootstrap3-dialog/#available-options |
That all makes sense, I think the problem is if you use the default (autodestroy:true), the library user expects to still be able to call the dialog object multiple times and have it behave the same, I would assume if you keep autodestroy:true it might just be a bit less efficient because it'll have to re-create the dom elements each time. |
Thanks for your notes. The reason of why it's true by default is that there will be many modal stuff last in dom tree and that will increase memory usage. We will change its default value to false if most people would like it to be that way. |
I think you could leave it it default to true if we could get the close button bug figured out. If you click outside of the dialog on 2nd open it still closes, just clicking the 'X' doesn't seem to do anything after the 2nd open. |
Still thinking.. |
The rest of this issue is to decide the default value of autodestroy, it's better to make it a pull request. Issue closed. |
Cool dialog plugin. I'm still playing around with it but it appears if I open the dialog object a second time the close button (the 'X') doesn't work to close the dialog. I can click outside of the dialog area and it does seem to close however.
The text was updated successfully, but these errors were encountered: