Skip to content

Commit edd69be

Browse files
committed
Do not trap tab in search bar
1 parent 77e674d commit edd69be

File tree

3 files changed

+3
-59
lines changed

3 files changed

+3
-59
lines changed

assets/js/search-bar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ function addEventListeners () {
8080
} else if (event.key === 'ArrowDown' || (appleOS && event.ctrlKey && event.key === 'n')) {
8181
moveAutocompleteSelection(1)
8282
event.preventDefault()
83-
} else if (event.key === 'Tab') {
83+
} else if (event.key === 'Tab' && selectedAutocompleteSuggestion() !== null) {
8484
togglePreview()
8585
event.preventDefault()
8686
}

formatters/html/dist/html-ZOXW4WH5.js

Lines changed: 0 additions & 56 deletions
This file was deleted.

lib/ex_doc/formatter/html/templates/sidebar_template.eex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@
7575
<span class="sr-only">Search documentation of <%= config.project %></span>
7676
<input name="q" type="text" class="search-input" placeholder="Press / to search" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />
7777
</label>
78-
<button type="submit" class="search-button" aria-label="Submit Search">
79-
<i class="ri-search-2-line ri-lg" aria-hidden="true" title="Submit search"></i>
78+
<button type="submit" class="search-button" aria-label="Submit Search" tabindex="-1">
79+
<i class="ri-search-2-line ri-lg" aria-hidden="true"></i>
8080
</button>
8181
<button type="button" tabindex="-1" class="search-close-button" aria-hidden="true">
8282
<i class="ri-close-line ri-lg" title="Cancel search"></i>

0 commit comments

Comments
 (0)