Skip to content

fix: Tab handling (indentation and toolbar focus) #1285

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 2, 2024

Conversation

matthewlipski
Copy link
Collaborator

This PR addresses the UX issue of using the Tab key to both indent blocks and to navigate UI elements. There are 2 things implemented here:

First, an editor option (tabKeyboardNavigation) has been added to disable Tab navigation for the formatting and link toolbars, as well as the file panel. Currently, these elements prevent indenting a selection of blocks while they're open and first require closing using Escape. Setting tabKeyboardNavigation to false will make Tab and Shift+Tab always indent/unindent blocks, regardless if those elements are shown.

Second, the formatting and link toolbars now stay closed after indenting/unindenting, instead of re-opening each time. The file panel doesn't need changes in this regard.

Closes #1142

Copy link

vercel bot commented Nov 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
blocknote ✅ Ready (Inspect) Visit Preview Nov 29, 2024 7:01pm
blocknote-website ✅ Ready (Inspect) Visit Preview Nov 29, 2024 7:01pm

Copy link
Collaborator

@YousefED YousefED left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! one comment

@matthewlipski matthewlipski merged commit 59a2b69 into main Dec 2, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot indent a selection of blocks or a block that starts with a link
2 participants