Commit 46988af6 authored by catboxanon's avatar catboxanon

Fix `Esc` interrupt when button not visible

parent b7f45e67
......@@ -167,10 +167,12 @@ 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') {
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