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

Cancel button leaves extra elements in the DOM #28

Closed
Ajedi32 opened this issue Apr 3, 2015 · 4 comments
Closed

Cancel button leaves extra elements in the DOM #28

Ajedi32 opened this issue Apr 3, 2015 · 4 comments

Comments

@Ajedi32
Copy link

Ajedi32 commented Apr 3, 2015

When you click a link or button that requires confirmation and then click cancel, twitter-bootstrap-rails-confirm leaves an extra hidden #confirmation_dialog element in the DOM, even after the fade out animation completes.

@rvanlieshout
Copy link
Member

That's actually by design. The second dialog won't create a new one (read: should not create a new one). Would you prefer that it removes and recreates it?

@Ajedi32
Copy link
Author

Ajedi32 commented Apr 10, 2015

It doesn't reuse the old dialog though. After opening and closing the dialog a few times, I end up with multiple objects in the DOM with the id #confirmation_dialog

@rvanlieshout
Copy link
Member

Ok, that's wrong. I'll dive in next week!

@lachdoug
Copy link

I think that the problem could be with: .on("hidden", -> $(this).remove())
In Bootstrap v3 the event is "hidden.bs.modal". It was "hidden" in v2.

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

3 participants