diff options
author | leo60228 <leo@60228.dev> | 2024-09-11 18:19:50 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2025-01-10 18:51:25 -0400 |
commit | 55dad23c4b65f9040b6b3e97c05813263b009ef7 (patch) | |
tree | 6566d44b3f3503a0b00a0ce5f313ccdf55b78112 /src | |
parent | 21de3c57d4a5364228fc95ffc3d79dae5ea16586 (diff) |
address review
Diffstat (limited to 'src')
-rw-r--r-- | src/static/css/site.css | 1 | ||||
-rw-r--r-- | src/static/js/client/sidebar-search.js | 8 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/static/css/site.css b/src/static/css/site.css index 7eb3605c..b2a64c76 100644 --- a/src/static/css/site.css +++ b/src/static/css/site.css @@ -655,7 +655,6 @@ summary.underline-white > span:hover a:not(:hover) { position: relative; display: flex; padding: 4px 3px 4px 6px; - outline: none; } .wiki-search-result:hover { diff --git a/src/static/js/client/sidebar-search.js b/src/static/js/client/sidebar-search.js index 917b9c12..34d2161f 100644 --- a/src/static/js/client/sidebar-search.js +++ b/src/static/js/client/sidebar-search.js @@ -330,11 +330,11 @@ export function addPageListeners() { info.searchInput.addEventListener('drop', handleDroppedIntoSearchInput); info.searchInput.addEventListener('keydown', domEvent => { - if (domEvent.key === 'ArrowDown' && info.searchInput.value.length === info.searchInput.selectionStart) { + if (domEvent.key === 'ArrowDown') { const elem = info.results?.firstChild; if (elem && !elem.classList.contains('wiki-search-no-results')) { domEvent.preventDefault(); - elem.focus(); + elem.focus({focusVisible: true}); } } }); @@ -790,13 +790,13 @@ function generateSidebarSearchResultTemplate(slots, info) { const elem = link.nextElementSibling; if (elem) { domEvent.preventDefault(); - elem.focus(); + elem.focus({focusVisible: true}); } } else if (domEvent.key === 'ArrowUp') { domEvent.preventDefault(); const elem = link.previousElementSibling; if (elem) { - elem.focus(); + elem.focus({focusVisible: true}); } else { info.searchInput.focus(); } |