« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/static
diff options
context:
space:
mode:
Diffstat (limited to 'src/static')
-rw-r--r--src/static/css/site.css3
-rw-r--r--src/static/js/client/sidebar-search.js8
2 files changed, 6 insertions, 5 deletions
diff --git a/src/static/css/site.css b/src/static/css/site.css
index b2a64c76..6c853161 100644
--- a/src/static/css/site.css
+++ b/src/static/css/site.css
@@ -680,7 +680,8 @@ summary.underline-white > span:hover a:not(:hover) {
   border-bottom: 1px solid var(--dim-color);
 }
 
-.wiki-search-result:hover::before, .wiki-search-result:focus::before {
+.wiki-search-result:hover::before,
+.wiki-search-result:focus::before {
   display: block;
   background: var(--light-ghost-color);
 }
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});
       }