Small fix (#16872)
* small fix, prevent annoying error log when registering keydown esc from user custom js * Update script.js Co-authored-by: missionfloyd <missionfloyd@users.noreply.github.com> --------- Co-authored-by: missionfloyd <missionfloyd@users.noreply.github.com>pull/16592/merge
parent
d8688def65
commit
e7edad6fe9
|
|
@ -182,7 +182,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 === 'block') {
|
||||
if (interruptButton?.style.display === 'block') {
|
||||
interruptButton.click();
|
||||
e.preventDefault();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue