diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2025-06-04 16:43:24 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2025-06-04 16:49:58 +0200 |
commit | 4c2dbeecd7bafa5e55893c939c800edc9eb5f4a7 (patch) | |
tree | 667d31a58ab7e4d05f918623bd434f07e7ea49cc | |
parent | 79856bdc0910b39a96e0cb2c7ae2d75fee4866bb (diff) |
info modal: Workaround for boostrap bug #41005.
Bug: https://github.com/twbs/bootstrap/issues/41005#issuecomment-2585390544
-rw-r--r-- | main.js | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -472,6 +472,13 @@ if (window.location === window.parent.location) { btn.setAttribute('aria-expanded', 'true'); btn.classList.replace('btn-light', 'btn-dark'); }); + panel.addEventListener('hide.bs.modal', function() { + /* XXX workaround for https://github.com/twbs/bootstrap/issues/41005#issuecomment-2585390544 */ + const activeElement = document.activeElement; + if (activeElement instanceof HTMLElement) { + activeElement.blur(); + } + }); panel.addEventListener('hidden.bs.modal', function() { btn.classList.replace('btn-dark', 'btn-light'); btn.setAttribute('aria-expanded', 'false'); |