diff options
author | kaalibro <konstantin.adamovich@gmail.com> | 2023-12-11 12:06:08 +0000 |
---|---|---|
committer | kaalibro <konstantin.adamovich@gmail.com> | 2023-12-11 12:06:08 +0000 |
commit | 6513470f0db1aed1b0a5200634e8e02f7c05e932 (patch) | |
tree | 4c8397c0320511984477ad938fb37685da449107 /script.js | |
parent | cee1a4065162982e18f32761259d9107538c2d93 (diff) | |
download | stable-diffusion-webui-gfx803-6513470f0db1aed1b0a5200634e8e02f7c05e932.tar.gz stable-diffusion-webui-gfx803-6513470f0db1aed1b0a5200634e8e02f7c05e932.tar.bz2 stable-diffusion-webui-gfx803-6513470f0db1aed1b0a5200634e8e02f7c05e932.zip |
Remove unnecessary 'else', add 'lightboxModal' check
Diffstat (limited to 'script.js')
-rw-r--r-- | script.js | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -164,12 +164,11 @@ document.addEventListener('keydown', function(e) { if (isEsc) { const globalPopup = document.querySelector('.global-popup'); - if (!globalPopup || globalPopup.style.display === "none") { + const lightboxModal = document.querySelector('#lightboxModal'); + if (!globalPopup || globalPopup.style.display === 'none') { + if (document.activeElement === lightboxModal) return; interruptButton.click(); e.preventDefault(); - } else { - if (!globalPopup) return; - globalPopup.style.display = "none"; } } }); |