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: Formatting Toolbar not hiding when clicking on elements outside it #233

Merged
merged 4 commits into from
Jun 15, 2023

Conversation

matthewlipski
Copy link
Collaborator

@matthewlipski matthewlipski commented Jun 2, 2023

The formatting toolbar is supposed to hide if the editor blurs, unless the element the focus is moving to is the formatting toolbar itself. The condition which checked for this was incorrect, and instead checked if the focus moved to any descendant of the formatting toolbar's parent element. Since the formatting toolbar gets appended to the doc, it meant that the toolbar would not be closed if clicking on any element inside the doc.

Closes #161

TODO:

  • Fix Tippy in the link creation menu
    • Link creation menu inputs are not selectable if the popup is appended to the button. Has to be appended to document.body to select inputs with the mouse. Because of that, toolbar disappears since popup is not a descendant. There is an easy fix but it's extremely ugly.
  • Fix hyperlink toolbar also not disappearing

@vercel
Copy link

vercel bot commented Jun 2, 2023

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

Name Status Preview Comments Updated (UTC)
blocknote-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 14, 2023 4:05pm

@matthewlipski matthewlipski marked this pull request as draft June 2, 2023 18:53
@matthewlipski matthewlipski merged commit 88b4536 into main Jun 15, 2023
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.

Formatting toolbar not closing when leaving current page
2 participants