Skip to content

fix(super-editor): restore toolbar dropdown keyboard focus#3304

Open
sergiogomes wants to merge 1 commit into
superdoc-dev:mainfrom
sergiogomes:fix/toolbar-dropdown-keyboard-focus
Open

fix(super-editor): restore toolbar dropdown keyboard focus#3304
sergiogomes wants to merge 1 commit into
superdoc-dev:mainfrom
sergiogomes:fix/toolbar-dropdown-keyboard-focus

Conversation

@sergiogomes
Copy link
Copy Markdown

Summary

  • Opens toolbar dropdowns with Enter and Space.
  • Restores focus to the dropdown trigger when Escape closes the menu.
  • Adds unit coverage for dropdown keyboard activation and Escape focus restoration.

Test plan

  • Targeted toolbar tests:
pnpm exec vitest run packages/super-editor/src/editors/v1/components/toolbar/ButtonGroup.test.js packages/super-editor/src/editors/v1/components/toolbar/ToolbarDropdown.test.js
  • pnpm run format:check
  • pnpm run lint
  • Manual: open font dropdown, navigate with arrow keys, press Escape, confirm focus returns to the trigger.

Note: local commands printed existing warnings outside the toolbar files touched in this PR.

image

@sergiogomes sergiogomes force-pushed the fix/toolbar-dropdown-keyboard-focus branch from 0bb5ffe to 518d0db Compare May 14, 2026 15:59
@sergiogomes
Copy link
Copy Markdown
Author

Rebased onto the latest main and resolved the ButtonGroup.test.js conflict by keeping both the upstream argument-forwarding tests and this PR’s dropdown keyboard activation coverage.

@caio-pizzol caio-pizzol self-assigned this May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants