Skip to content
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

fix: Show formatting toolbar when editor isn't editable #1024

Merged
merged 5 commits into from
Aug 26, 2024

Conversation

matthewlipski
Copy link
Collaborator

@matthewlipski matthewlipski commented Aug 22, 2024

There seems to have been a regression as the formatting toolbar no longer shows when the editor is not editable. It should be the responsibility of toolbar buttons to determine whether to be shown instead, as the file download button should always be visible when a file block is selected.

The regression is a result of updating TipTap to v2.5.0, as the editor is no longer focusable when it's not editable. This PR adds tabIndex: "0" to the editor element's DOM attributes to revert this functionality, fixing the formatting toolbar behaviour.

Copy link

vercel bot commented Aug 22, 2024

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

Name Status Preview Updated (UTC)
blocknote ✅ Ready (Inspect) Visit Preview Aug 22, 2024 7:08pm
blocknote-website ✅ Ready (Inspect) Visit Preview Aug 22, 2024 7:08pm

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.

Looks ok. Conceptually we could wonder if non-editable features (like download button) should be in a "formatting toolbar" or not, or what the best API for this would be. For now this seems ok though

@matthewlipski matthewlipski merged commit 280c280 into main Aug 26, 2024
5 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.

2 participants