mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-12-06 10:31:17 -08:00
Fix Esc interrupt when button not visible
This commit is contained in:
parent
b7f45e67dc
commit
46988af636
1 changed files with 4 additions and 2 deletions
|
|
@ -167,10 +167,12 @@ document.addEventListener('keydown', function(e) {
|
||||||
const lightboxModal = document.querySelector('#lightboxModal');
|
const lightboxModal = document.querySelector('#lightboxModal');
|
||||||
if (!globalPopup || globalPopup.style.display === 'none') {
|
if (!globalPopup || globalPopup.style.display === 'none') {
|
||||||
if (document.activeElement === lightboxModal) return;
|
if (document.activeElement === lightboxModal) return;
|
||||||
|
if (interruptButton.style.display !== 'none') {
|
||||||
interruptButton.click();
|
interruptButton.click();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue