Repository navigation
fix(mantine): make toolbar buttons tabbable in Safari - #3471
ronavkarumsi04 wants to merge 1 commit into
Conversation
|
@ronavkarumsi04 is attempting to deploy a commit to the TypeCell Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
@matthewlipski this seems like a good fix. can you validate? |
Summary
Fixes #2993. Pressing Tab with the formatting toolbar open never moved focus into the toolbar on macOS Safari.
Rationale
macOS Safari (WebKit on Cocoa) only puts plain
<button>s in the Tab order when "Press Tab to highlight each item" is enabled. Elements with an explicittabindexare always keyboard-focusable, so giving the Mantine toolbar controlstabIndex={0}makes Tab reach them under Safari's default settings, as it already does in Chrome and Firefox.Changes
ToolbarButton(both theButtonandActionIconvariants) and theToolbarSelecttrigger in@blocknote/mantinesettabIndex={0}.DesktopFormattingToolbarController.browser.test.tsx: Tab from the editor reaches the block type control and then Bold, the controls carrytabindex="0", and the selection and document are unchanged.Impact
No change in browsers that already tab to buttons; the editor's own Tab handling and the mobile tap-focus prevention (
preventFocusOnTap) are untouched.Testing
tabindexwasnull) and passes after.pnpm lintclean.Checklist
Additional Notes
Prepared with AI assistance (Devin).
Summary by CodeRabbit