We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 274f054 commit fe3ccb2Copy full SHA for fe3ccb2
docs/src/assets/js/search.js
@@ -216,6 +216,15 @@ if (poweredByLink) {
216
});
217
}
218
219
+if (resultsElement) {
220
+ resultsElement.addEventListener('keydown', (e) => {
221
+ if (e.key !== "ArrowUp" && e.key !== "ArrowDown" && e.key !== "Tab" && e.key !== 'Shift') {
222
+ searchInput.focus();
223
+ searchInput.setSelectionRange(searchInput.value.length, searchInput.value.length);
224
+ }
225
+ });
226
+}
227
+
228
document.addEventListener('keydown', function (e) {
229
const searchResults = Array.from(document.querySelectorAll('.search-results__item'));
230
const isArrowKey = e.key === "ArrowUp" || e.key === "ArrowDown";
0 commit comments