Skip to content

Commit

Permalink
Refactor JS listing code
Browse files Browse the repository at this point in the history
  • Loading branch information
Usbac committed Sep 29, 2024
1 parent d14c91c commit dfe9ab9
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions public/assets/js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
}
});
Expand Down

0 comments on commit dfe9ab9

Please sign in to comment.