« get me outta code hell

address review 3 - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/static/js/client/sidebar-search.js
diff options
context:
space:
mode:
authorleo60228 <leo@60228.dev>2024-09-14 18:04:18 -0400
committer(quasar) nebula <qznebula@protonmail.com>2025-01-10 18:51:26 -0400
commite7f9ff5a305e049ca7204995e9377c32162da889 (patch)
tree9c07b4feb88ed2437ac007e2d14a7ac261fa531b /src/static/js/client/sidebar-search.js
parent13f8b8fe7679161a272db67ebb06d75c86d6041d (diff)
address review 3
Diffstat (limited to 'src/static/js/client/sidebar-search.js')
-rw-r--r--src/static/js/client/sidebar-search.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/static/js/client/sidebar-search.js b/src/static/js/client/sidebar-search.js
index f46ce8e8..48bc8d08 100644
--- a/src/static/js/client/sidebar-search.js
+++ b/src/static/js/client/sidebar-search.js
@@ -69,6 +69,8 @@ export const info = {
     tidiedSidebar: null,
     collapsedDetailsForTidiness: null,
 
+    currentValue: null,
+
     workerStatus: null,
     searchStage: null,
 
@@ -76,8 +78,6 @@ export const info = {
     stoppedScrollingTimeout: null,
 
     indexDownloadStatuses: Object.create(null),
-
-    currentValue: null,
   },
 
   session: {
@@ -348,8 +348,8 @@ export function addPageListeners() {
 
   info.searchInput.addEventListener('keydown', domEvent => {
     if (domEvent.key === 'ArrowDown') {
-      const elem = info.results?.firstChild;
-      if (elem && !elem.classList.contains('wiki-search-no-results')) {
+      const elem = info.results.firstChild;
+      if (elem?.classList?.contains?.('wiki-search-result')) {
         domEvent.preventDefault();
         elem.focus({focusVisible: true});
       }