Commit d235aa06 authored by AUTOMATIC1111's avatar AUTOMATIC1111 Committed by GitHub

Merge pull request #14932 from AUTOMATIC1111/fix/esc-interrupt

Only trigger interrupt on `Esc` when interrupt button visible
parents ce57a6c6 46988af6
...@@ -167,10 +167,12 @@ document.addEventListener('keydown', function(e) { ...@@ -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();
} }
} }
}
}); });
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment