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,8 +167,10 @@ document.addEventListener('keydown', function(e) {
const lightboxModal = document.querySelector('#lightboxModal');
if (!globalPopup || globalPopup.style.display === 'none') {
if (document.activeElement === lightboxModal) return;
interruptButton.click();
e.preventDefault();
if (interruptButton.style.display !== 'none') {
interruptButton.click();
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