| ... | ... | @@ -133,6 +133,7 @@ const NAV_MODES = { |
| 133 | 133 | |
| 134 | 134 | domSearch.disabled = false; |
| 135 | 135 | domSearch.addEventListener("keydown", onSearchKeyDown, false); |
| 136 | domSearch.addEventListener("input", onSearchInput, false); |
| 136 | 137 | domSearch.addEventListener("focus", ev => { |
| 137 | 138 | domSearchPlaceholder.classList.add("hidden"); |
| 138 | 139 | canToggleHelpModal = false; |
| ... | ... | @@ -4009,15 +4010,17 @@ function addDeclToSearchResults(decl, declIndex, modNames, item, list, stack) { |
| 4009 | 4010 | ev.stopPropagation(); |
| 4010 | 4011 | return; |
| 4011 | 4012 | default: |
| 4012 | | if (ev.shiftKey || ev.ctrlKey || ev.altKey) return; |
| 4013 | | |
| 4014 | | curSearchIndex = -1; |
| 4013 | // Search is triggered via an `input` event handler, not on arbitrary `keydown` events. |
| 4015 | 4014 | ev.stopPropagation(); |
| 4016 | | startAsyncSearch(); |
| 4017 | 4015 | return; |
| 4018 | 4016 | } |
| 4019 | 4017 | } |
| 4020 | 4018 | |
| 4019 | function onSearchInput(ev) { |
| 4020 | curSearchIndex = -1; |
| 4021 | startAsyncSearch(); |
| 4022 | } |
| 4023 | |
| 4021 | 4024 | function moveSearchCursor(dir) { |
| 4022 | 4025 | if ( |
| 4023 | 4026 | curSearchIndex < 0 || |