-
Notifications
You must be signed in to change notification settings - Fork 434
Description
Description
When opening the DocSearch v4 modal with cmd+k, and then closing it with 'esc, the modal will always re-open on every keystroke
It doesn't seem to happen when closing the modal by clicking the transparent overlay, but it also seems to happen if I click the modal "x" button or press 'esc'.
It also happens if we close the modal by clicking a search hit, but it doesn't happen if we use keyboard navigation and select the search hit by pressing enter.
Docusaurus bug reported: facebook/docusaurus#11572
Steps to reproduce
This reproduces on a minimal DocSearch v4 repro I created for another issue: #2804
- code: slorber/docsearch-v4-button-style-bug-repro
- runnable playground: stackblitz.com/~/github.com/slorber/docsearch-v4-button-style-bug-repro
This reproduces on the playground: https://community.algolia.com/docsearch-playground/
This reproduces on the DocSearch + Docusaurus docs websites
Expected behavior
After closing the DocSearch modal, random keyboard presses shouldn't re-open the modal
Environment
"@docsearch/react": "^4.3.2",