Skip to content

Commit

Permalink
Invoke and close search with keyboard
Browse files Browse the repository at this point in the history
  • Loading branch information
robdekort committed Nov 3, 2021
1 parent 702c552 commit bc56e28
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dev/resources/views/components/_search_form.antlers.html
Expand Up @@ -10,6 +10,8 @@

<li
x-data="{ open: false, value: '' }"
@keydown.window.prevent.slash.="open = true, setTimeout(() => {$refs.input.focus()}, 200)"
@keydown.window.prevent.esc="open = false"
@click.outside="open = false"
class="flex py-2 relative"
x-cloak
Expand Down

0 comments on commit bc56e28

Please sign in to comment.