Commit 2f0abe63d4

r00ster91 <r00ster91@proton.me>
2022-08-06 15:16:27
fix: disable search bar before loading
This fixes the new search placeholder not disappearing if you type before it finished loading, and maybe some other things.
1 parent df8cfb1
Changed files (2)
lib/docs/index.html
@@ -616,7 +616,7 @@
           <section class="docs">
             <div style="position: relative">
               <span id="searchPlaceholder"><kbd>S</kbd> to search, <kbd>?</kbd> for more options</span>
-              <input type="search" class="search" id="search" autocomplete="off" spellcheck="false">
+              <input type="search" class="search" id="search" autocomplete="off" spellcheck="false" disabled>
             </div>
             <p id="status">Loading...</p>
             <div id="sectNav" class="hidden"><ul id="listNav"></ul></div>
lib/docs/main.js
@@ -51,6 +51,8 @@ var zigAnalysis;
   let domHelpModal = document.getElementById("helpModal");
   const domSearchPlaceholder = document.getElementById("searchPlaceholder");
 
+  domSearch.disabled = false;
+
   let searchTimer = null;
 
   let escapeHtmlReplacements = {