-
-
Notifications
You must be signed in to change notification settings - Fork 490
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
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Ok, I think I know why we're seeing the 2 bugs mentioned: Bug 1In However, it would be more sensible if instead of manually updating @YousefED Since this requires a refactor for all UI elements, I think we should wait with this for the 0.19.3 release. Bug 2This is because we use ProseMirror's built-in logic for drag & drop within the editor, which is based on selection. We do set the clipboard data, but seems like PM doesn't use that to clear the blocks from the original position. So if we don't set the selection on In theory this shouldn't be too difficult to fix, since we just have to handle the drop event and clear the original blocks ourselves. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment above
Thanks! Did you also dig into whether there could be other bugs or why it might be unsafe to remove the listeners? |
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:
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: