askorama / orama

🌌 Fast, dependency-free, full-text and vector search engine with typo tolerance, filters, facets, stemming, and more. Works with any JavaScript runtime, browser, server, service!
https://docs.askorama.ai
Other
8.27k stars 273 forks source link

Keyboard navigation with @orama/searchbox and vitepress #691

Open stafyniaksacha opened 2 months ago

stafyniaksacha commented 2 months ago

Describe the bug

When using native keyboard navigation, multiples issues occurs:

  1. ctrl+k: does not prevent default browser behavior, modal is open, but focus is given to browser address bar instead of the modal search input
  2. tab / shift+tab: when in search modal with results, using default shortcuts to focus next element does not focus element that have click handler, so we can't hit enter to select the result ( / works)

To Reproduce

Go to https://docs.askorama.ai/

Expected behavior

Environment Info

Affected areas

Search

Additional context

No response

micheleriva commented 2 months ago

Hi @stafyniaksacha, thanks for opening this. We're currently reworking the searchbox, let me tag my colleagues who are working on this to ensure that this behavior is fixed.

cc. @g-francesca, @SaraVieira