From afc810f21f561e3aaa3f8f533357034df5c0c878 Mon Sep 17 00:00:00 2001 From: Will Miao <13051207myq@gmail.com> Date: Tue, 24 Jun 2025 22:12:53 +0800 Subject: [PATCH] feat: prevent Ctrl+A behavior when search input is focused. See #251 --- static/js/managers/BulkManager.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/static/js/managers/BulkManager.js b/static/js/managers/BulkManager.js index 59e5e2b0..3c47d9fa 100644 --- a/static/js/managers/BulkManager.js +++ b/static/js/managers/BulkManager.js @@ -41,6 +41,12 @@ export class BulkManager { return; // Exit early - let the browser handle Ctrl+A within the modal } + // Check if search input is currently focused - if so, don't handle Ctrl+A + const searchInput = document.getElementById('searchInput'); + if (searchInput && document.activeElement === searchInput) { + return; // Exit early - let the browser handle Ctrl+A within the search input + } + // Prevent default browser "Select All" behavior e.preventDefault();