Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-69086 theme_boost: Improve pendingJs checks for bootstrap
Where an element, like an `alert`, is closed it is removed from the DOM before the event fires (this is a correct behaviour). This means that the final event confirming that the action happened (i.e. close => closed) fires, but does not bubble up the DOM to the document.body. This change moves the end event listener to only be added after a start event has been fired, and to attach directly to the HTMLElement where it will be fired. This means that the Event handler will still be called, even though it has been removed from the DOM, because it does not need to bubble up to the body.
- Loading branch information