authorgravatar for kappaloris@gmail.comLoris Cro <kappaloris@gmail.com> 2023-06-18 09:06:51+02:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2023-06-18 09:06:51+02:00
log329a585fbe50583d6cef7a554c27525afe2e9d41
tree8c239dab283ae9cb3b7fe099bae240bcc53f894e
parent729a051e9e38674233190aea23c0ac8c134f2d67
parent216ef10dc471e4db60a30208be178d6c59efeaaf
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

Merge pull request #15512 from cryptocode/autodoc-searchkey

autodoc: Add / as an alternative search key

2 files changed, 3 insertions(+), 2 deletions(-)

lib/docs/index.html+2-2
...@@ -758,7 +758,7 @@...@@ -758,7 +758,7 @@
758 <div class="wrap">758 <div class="wrap">
759 <section class="docs" style="padding-top: 1.5rem; padding-bottom:0;">759 <section class="docs" style="padding-top: 1.5rem; padding-bottom:0;">
760 <div style="position: relative">760 <div style="position: relative">
761 <span id="searchPlaceholder"><kbd>s</kbd> to search, <kbd>?</kbd> for more options</span>761 <span id="searchPlaceholder"><kbd>/</kbd> or <kbd>s</kbd> to search, <kbd>?</kbd> for more options</span>
762 <input type="search" class="search" id="search" autocomplete="off" spellcheck="false" disabled>762 <input type="search" class="search" id="search" autocomplete="off" spellcheck="false" disabled>
763 </div>763 </div>
764 </section>764 </section>
...@@ -876,7 +876,7 @@...@@ -876,7 +876,7 @@
876 <div class="modal">876 <div class="modal">
877 <h1>Keyboard Shortcuts</h1>877 <h1>Keyboard Shortcuts</h1>
878 <dl><dt><kbd>?</kbd></dt><dd>Toggle this help modal</dd></dl>878 <dl><dt><kbd>?</kbd></dt><dd>Toggle this help modal</dd></dl>
879 <dl><dt><kbd>s</kbd></dt><dd>Focus the search field</dd></dl>879 <dl><dt><kbd>s</kbd> or <kbd>/</kbd></dt><dd>Focus the search field</dd></dl>
880 <div style="margin-left: 1em">880 <div style="margin-left: 1em">
881 <dl><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd></dl>881 <dl><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd></dl>
882 <dl><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd></dl>882 <dl><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd></dl>
lib/docs/main.js+1
...@@ -4106,6 +4106,7 @@ function addDeclToSearchResults(decl, declIndex, modNames, item, list, stack) {...@@ -4106,6 +4106,7 @@ function addDeclToSearchResults(decl, declIndex, modNames, item, list, stack) {
4106 case "Esc":4106 case "Esc":
4107 onEscape(ev);4107 onEscape(ev);
4108 break;4108 break;
4109 case "/":
4109 case "s":4110 case "s":
4110 if (domHelpModal.classList.contains("hidden")) {4111 if (domHelpModal.classList.contains("hidden")) {
4111 if (ev.target == domSearch) break;4112 if (ev.target == domSearch) break;