Merge pull request #14932 from AUTOMATIC1111/fix/esc-interrupt
Only trigger interrupt on `Esc` when interrupt button visible
This commit is contained in:
commit
d235aa068d
|
@ -167,8 +167,10 @@ 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;
|
||||||
interruptButton.click();
|
if (interruptButton.style.display !== 'none') {
|
||||||
e.preventDefault();
|
interruptButton.click();
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue