### Have you read the Contributing Guidelines on issues? - [X] I have read the [Contributing Guidelines on issues](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#issues). ### Prerequisites - [X] I'm using the latest version of Docusaurus. - [X] I have tried the `npm run clear` or `yarn clear` command. - [X] I have tried `rm -rf node_modules yarn.lock package-lock.json` and re-installing packages. - [X] I have tried creating a repro with https://new.docusaurus.io. - [ ] I have read the console error message carefully (if applicable). ### Description Thank you, maintainers and contributors, for this useful framework! --- Bug: Keyboard focus is lost when exiting the dropdown (e.g. language switcher). https://user-images.githubusercontent.com/34136752/220798258-75584e75-efd3-4f9b-b9f3-fcd00f7d401c.mp4 ### Reproducible demo https://stackblitz.com/edit/github-segjfa?file=docusaurus.config.js ### Steps to reproduce 1. Press `Tab`, `Tab`, ... to focus language switcher. 2. Press `Enter` to open dropdown. 3. Press `Tab`, `Tab`, ... to move focus. 4. When exiting the dropdown, focus is lost. ### Expected behavior Focus moves to theme switcher. ### Actual behavior Focus is lost. ### Your environment - Public source code: https://github.com/markuplint/markuplint/tree/dev/website - Public site URL: https://markuplint.dev/ - Docusaurus version used: 2.2.0 - Environment name and version (e.g. Chrome 89, Node.js 16.4): Chrome 110, Node.js 16.16.0 - Operating system and version (e.g. Ubuntu 20.04.2 LTS): Windows 11 ### Self-service - [X] I'd be willing to fix this bug myself.
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clearoryarn clearcommand.rm -rf node_modules yarn.lock package-lock.jsonand re-installing packages.Description
Thank you, maintainers and contributors, for this useful framework!
Bug: Keyboard focus is lost when exiting the dropdown (e.g. language switcher).
Docusaurus.-.Dropdown.Keyboard.Focus.Bug.cut.mp4
Reproducible demo
https://stackblitz.com/edit/github-segjfa?file=docusaurus.config.js
Steps to reproduce
Tab,Tab, ... to focus language switcher.Enterto open dropdown.Tab,Tab, ... to move focus.Expected behavior
Focus moves to theme switcher.
Actual behavior
Focus is lost.
Your environment
Self-service