Closed mxschmitt closed 7 months ago
Proposed fix: Doing searchButtonRef.current?.focus()
here:
Alternatively we could focus the element here, which seems also reasonable:
Any thoughts would be appreciated, happy to create a PR for it once clarified. The solution above seems to work.
Sounds related to https://github.com/algolia/docsearch/issues/1370 but seems easily solvable in docusaurus land.
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
When entering the Search dialog of docusaurus and leaving it afterwards via ESC, the page looses focus and does not re-focus the search input box from before.
Relates https://github.com/microsoft/playwright.dev/issues/1269.
Reproducible demo
No response
Steps to reproduce
Expected behavior
Focus stays at the search input box.
Actual behavior
Focus gets lost.
Your environment
Self-service