How do I remove the element?
Modal service for AngularJS - supports creating popups and modals via a service.
Brought to you by:
evanfcrane
Originally created by: lindamarieb
In FAQ "I'm using a Bootstrap Modal and the backdrop doesn't fade away", it mentions: "It will try and make both elements into a modal. This means both elements will get a backdrop. In this case, either remove the extra elements, or find the specific element you need from the provided modal.element property."
I have a scenario where I want to force the user to take an action via a modal dialog. If the user does not take the action and reloads the page, it will open the dialog again with the result that the dialog cannot be closed properly.
How do I find the existing dialog element and remove it?
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: malfborger
yeah it kinda bloats the DOM doens't it? http://cl.ly/image/2E2d443n2B3s
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: dwmkerr
Hi @lindamarieb I'm not sure I understand the question. The issue you refer to at the beginning is about having multiple top level elements in the modal template, i.e.
would not be a suitable modal template as it has three top level elements, this is solved by doing:
The DOM bloat of backdrops can occur when you do not allow the animation to bootstrap animation to complete, if it does not complete it will not remove the backdrop.
Now if there is a modal present and the user reloads the page, why would there be a backdrop present at all? A reload is going to clear the DOM and rebuild it with the contents of the
GET.Are you looking for [#33]? Please take a look at that issue, if it looks like it is the same issue then please let me know, I'll close this and bump the priority of [#33].
Related
Tickets: #33
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Ticket changed by: dwmkerr