Commit 6513470f authored by kaalibro's avatar kaalibro

Remove unnecessary 'else', add 'lightboxModal' check

parent cee1a406
......@@ -164,12 +164,11 @@ document.addEventListener('keydown', function(e) {
if (isEsc) {
const globalPopup = document.querySelector('.global-popup');
if (!globalPopup || globalPopup.style.display === "none") {
const lightboxModal = document.querySelector('#lightboxModal');
if (!globalPopup || globalPopup.style.display === 'none') {
if (document.activeElement === lightboxModal) return;
interruptButton.click();
e.preventDefault();
} else {
if (!globalPopup) return;
globalPopup.style.display = "none";
}
}
});
......
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