Skip to content

Commit f34b33e

Browse files
committed
fix bug/new-role-close-dialog-box
1 parent bb2abf1 commit f34b33e

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

static/js/app.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ document.body.addEventListener('htmx:configRequest', function() {
2121
// clean up any Bootstrap modal backdrop left behind by OOB swaps that
2222
// replaced the modal element before afterRequest could call .hide().
2323
document.body.addEventListener('modalDismiss', function() {
24+
document.querySelectorAll('.modal.show').forEach(function(el) {
25+
var modal = bootstrap.Modal.getInstance(el);
26+
if (modal) {
27+
modal.hide();
28+
}
29+
});
2430
document.querySelectorAll('.modal-backdrop').forEach(function(el) { el.remove(); });
2531
document.body.classList.remove('modal-open');
2632
document.body.style.removeProperty('overflow');

0 commit comments

Comments
 (0)