« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/static/js/client.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/static/js/client.js b/src/static/js/client.js
index 0d6cc4e1..d3c7f36a 100644
--- a/src/static/js/client.js
+++ b/src/static/js/client.js
@@ -3676,7 +3676,12 @@ async function activateSidebarSearch(query) {
 
 function clearSidebarSearch() {
   const info = sidebarSearchInfo;
-  const {session} = info;
+  const {session, state} = info;
+
+  if (state.stoppedTypingTimeout) {
+    clearTimeout(state.stoppedTypingTimeout);
+    state.stoppedTypingTimeout = null;
+  }
 
   info.searchInput.value = '';
   session.activeQuery = '';