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.
This commit is contained in:
r00ster91 2022-08-06 15:16:27 +02:00
parent df8cfb1273
commit 2f0abe63d4
2 changed files with 3 additions and 1 deletions

View File

@ -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>

View File

@ -51,6 +51,8 @@ var zigAnalysis;
let domHelpModal = document.getElementById("helpModal");
const domSearchPlaceholder = document.getElementById("searchPlaceholder");
domSearch.disabled = false;
let searchTimer = null;
let escapeHtmlReplacements = {