mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 16:54:52 +00:00
autodoc: Add / as an alternative search key
Per Discord discussion. Motivation: `/` is now the de facto standard for initating search on webpages.
This commit is contained in:
parent
13aaa16ab2
commit
5d20a4e35c
@ -758,7 +758,7 @@
|
|||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<section class="docs" style="padding-top: 1.5rem; padding-bottom:0;">
|
<section class="docs" style="padding-top: 1.5rem; padding-bottom:0;">
|
||||||
<div style="position: relative">
|
<div style="position: relative">
|
||||||
<span id="searchPlaceholder"><kbd>s</kbd> to search, <kbd>?</kbd> for more options</span>
|
<span id="searchPlaceholder"><kbd>/</kbd> or <kbd>s</kbd> to search, <kbd>?</kbd> for more options</span>
|
||||||
<input type="search" class="search" id="search" autocomplete="off" spellcheck="false" disabled>
|
<input type="search" class="search" id="search" autocomplete="off" spellcheck="false" disabled>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@ -4031,6 +4031,7 @@ function addDeclToSearchResults(decl, declIndex, modNames, item, list, stack) {
|
|||||||
case "Esc":
|
case "Esc":
|
||||||
onEscape(ev);
|
onEscape(ev);
|
||||||
break;
|
break;
|
||||||
|
case "/":
|
||||||
case "s":
|
case "s":
|
||||||
if (domHelpModal.classList.contains("hidden")) {
|
if (domHelpModal.classList.contains("hidden")) {
|
||||||
if (ev.target == domSearch) break;
|
if (ev.target == domSearch) break;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user