mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-05-06 20:09:06 +08:00
small fix, prevent annoying error log when registering keydown esc from user custom js
This commit is contained in:
parent
d8688def65
commit
44446badc9
@ -182,7 +182,7 @@ 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 === 'block') {
|
if (interruptButton && interruptButton.style.display === 'block') {
|
||||||
interruptButton.click();
|
interruptButton.click();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user