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

wip: remove some formattingtoolbar listeners #1254

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

YousefED
Copy link
Collaborator

@YousefED YousefED commented Nov 17, 2024

I'm investigating if we can remove these listeners or fix them somewhere else.

It seems like floating-ui is covering a lot of the things these methods have been designed for. I think it would be nice to simplify this (and see "background" below for more motivation).

Bugs / issues
Can you help look into what bugs could arise from this? So far, I've encountered two changes:

  • Formatting toolbar doesn't "flip" position any more when scrolling
  • when dragging / dropping a block, the formatting toolbar appears. I think we need to solve this differently (i.e.: maybe we should just clear the selection when dragging blocks? Why is the dragged block selected at all?)
  • ...

Background
The reason I'm investigating it is so that we can potentially render UI elements (shadcn / floating ui etc) within a Portal. Currently, the BlurHandler in FormattingToolbar is not compatible with this as it expects events to come from within a specific dom root.

This would fix two issues:

Copy link

vercel bot commented Nov 17, 2024

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

Name Status Preview Updated (UTC)
blocknote ✅ Ready (Inspect) Visit Preview Nov 17, 2024 9:02pm
blocknote-website ✅ Ready (Inspect) Visit Preview Nov 17, 2024 9:02pm

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