Skip to content

Commit

Permalink
Do not trap tab in search bar
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Dec 21, 2024
1 parent 77e674d commit edd69be
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 59 deletions.
2 changes: 1 addition & 1 deletion assets/js/search-bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function addEventListeners () {
} else if (event.key === 'ArrowDown' || (appleOS && event.ctrlKey && event.key === 'n')) {
moveAutocompleteSelection(1)
event.preventDefault()
} else if (event.key === 'Tab') {
} else if (event.key === 'Tab' && selectedAutocompleteSuggestion() !== null) {
togglePreview()
event.preventDefault()
}
Expand Down
56 changes: 0 additions & 56 deletions formatters/html/dist/html-ZOXW4WH5.js

This file was deleted.

4 changes: 2 additions & 2 deletions lib/ex_doc/formatter/html/templates/sidebar_template.eex
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@
<span class="sr-only">Search documentation of <%= config.project %></span>
<input name="q" type="text" class="search-input" placeholder="Press / to search" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />
</label>
<button type="submit" class="search-button" aria-label="Submit Search">
<i class="ri-search-2-line ri-lg" aria-hidden="true" title="Submit search"></i>
<button type="submit" class="search-button" aria-label="Submit Search" tabindex="-1">
<i class="ri-search-2-line ri-lg" aria-hidden="true"></i>
</button>
<button type="button" tabindex="-1" class="search-close-button" aria-hidden="true">
<i class="ri-close-line ri-lg" title="Cancel search"></i>
Expand Down

0 comments on commit edd69be

Please sign in to comment.