« get me outta code hell

client, css: only show search scroll cue if there are any results - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/static/js/client
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2026-04-28 19:33:28 -0300
committer(quasar) nebula <qznebula@protonmail.com>2026-04-28 19:33:28 -0300
commit873d1fa8f938843d3b2c97e2229c1a3403621416 (patch)
treeaf620bf8edef4f6fb970feb6a9cab6500d37b2e3 /src/static/js/client
parenteb3032a97a2a195627929c56215e3f080f28aca8 (diff)
client, css: only show search scroll cue if there are any results
Diffstat (limited to 'src/static/js/client')
-rw-r--r--src/static/js/client/sidebar-search.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/static/js/client/sidebar-search.js b/src/static/js/client/sidebar-search.js
index 7d39f06e..94f1e4ef 100644
--- a/src/static/js/client/sidebar-search.js
+++ b/src/static/js/client/sidebar-search.js
@@ -939,6 +939,8 @@ function showSidebarSearchResults(results) {
   }
 
   if (shownAnyResults) {
+    info.results.classList.add('has-results');
+
     showContextControls();
 
     cssProp(info.endSearchRule, 'display', 'block');
@@ -946,6 +948,8 @@ function showSidebarSearchResults(results) {
 
     tidySidebarSearchColumn();
   } else {
+    info.results.classList.remove('has-results');
+
     const p = document.createElement('p');
     p.classList.add('wiki-search-no-results');
     p.appendChild(templateContent(info.noResultsString));