mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-12-29 19:05:05 +08:00
Remove unnecessary 'else', add 'lightboxModal' check
This commit is contained in:
parent
cee1a40651
commit
6513470f0d
@ -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";
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user