diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2025-02-12 06:45:25 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2025-02-12 08:04:28 -0400 |
commit | 51fc368c7d5b83454bdc6faa7bb66a67d35fdb82 (patch) | |
tree | 2e9ed68c00a3ff1906e6780ac65000cc58b9488b /src/static/js/client | |
parent | a304741f2358544406533a15a4b0b1a9a7a8077e (diff) |
client: sidebar-search: magnifying glass selects all
Diffstat (limited to 'src/static/js/client')
-rw-r--r-- | src/static/js/client/sidebar-search.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/static/js/client/sidebar-search.js b/src/static/js/client/sidebar-search.js index a5652412..f96ecf7b 100644 --- a/src/static/js/client/sidebar-search.js +++ b/src/static/js/client/sidebar-search.js @@ -348,6 +348,11 @@ export function addPageListeners() { state.recallingRecentSearchFromMouse = false; return; } + + const inputRect = info.searchInput.getBoundingClientRect(); + if (domEvent.clientX < inputRect.left) { + info.searchInput.select(); + } }); info.searchInput.addEventListener('change', _domEvent => { |