prevent escape button causing an interrupt when no generation has been made yet

This commit is contained in:
AUTOMATIC1111 2024-02-17 11:40:53 +03:00
parent db19c46d6d
commit 4573195894

View File

@ -167,7 +167,7 @@ document.addEventListener('keydown', function(e) {
const lightboxModal = document.querySelector('#lightboxModal');
if (!globalPopup || globalPopup.style.display === 'none') {
if (document.activeElement === lightboxModal) return;
if (interruptButton.style.display !== 'none') {
if (interruptButton.style.display === 'block') {
interruptButton.click();
e.preventDefault();
}