From dfe9ab9ebc1d63c6136c777ae1b0fa46a86badc5 Mon Sep 17 00:00:00 2001 From: Usbac Date: Sun, 29 Sep 2024 22:10:22 +0200 Subject: [PATCH] Refactor JS listing code --- public/assets/js/admin.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/public/assets/js/admin.js b/public/assets/js/admin.js index 29f2be3..b8c1410 100755 --- a/public/assets/js/admin.js +++ b/public/assets/js/admin.js @@ -213,11 +213,7 @@ class Listing { static init() { window.addEventListener('keydown', e => { - if (document.activeElement.tagName == 'INPUT') { - return; - } - - if ((e.key == 'Escape' && this.#select_mode) || e.key == 's') { + if (document.activeElement.tagName != 'INPUT' && (e.key == 's' || (e.key == 'Escape' && this.#select_mode))) { this.toggleSelectMode(get('.batch-options-container > button')); } });