Skip to content
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

Closed
mpalmerlee opened this issue Feb 28, 2014 · 8 comments
Closed

Close button doesn't seem to work after 2nd time opening dialog #17

mpalmerlee opened this issue Feb 28, 2014 · 8 comments

Comments

@mpalmerlee
Copy link

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.

@mpalmerlee
Copy link
Author

Note, this only seems to be when you don't specifically use the autodestroy: false option. Maybe this is the intended behavior?

@nakupanda
Copy link
Owner

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.

@nakupanda
Copy link
Owner

See the description of option 'autodestroy' in the crude documentation here: http://nakupanda.github.io/bootstrap3-dialog/#available-options

@mpalmerlee
Copy link
Author

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.

@nakupanda
Copy link
Owner

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.

@mpalmerlee
Copy link
Author

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.

@nakupanda
Copy link
Owner

Still thinking..

@nakupanda
Copy link
Owner

The rest of this issue is to decide the default value of autodestroy, it's better to make it a pull request.

Issue closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants