-
-
Notifications
You must be signed in to change notification settings - Fork 722
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
Mark Toolbar: Cannot resolve a DOM node from Slate node #2674
Comments
Waiting for feedback ianstormtaylor/slate#5516 In the meantime, use |
Fixed in #2676 |
is this still functionally working with insert?
|
If not, use it in |
I can reproduce it on the playground. recording.mp4Getting the Slate change reverted or fixed might be the best course of action here; even if we prevent the mousedown events on the dropdown trigger and dropdown item buttons, there will still be cases where manually focusing the editor is necessary for making keyboard accessible buttons and menus. (CC @josephmr, @dylans) We could just surpress the error if the DOM node can't be resolved. Adding a try/catch block to Slate would be the safest way of doing this to avoid catching more than we intend. |
Also can reproduce this issue with a link on floating toolbar with latest plate/slate:
|
Another |
Discussed in #2651
Originally posted by kieranm September 27, 2023
I've followed the docs on implementing a basic fixed toolbar, but I am running into a strange issue that's difficult to debug. For this demo I've removed all buttons other than Bold.
The issue is the following:
A video to illustrate the behaviour I'm seeing:
https://github.com/udecode/plate/assets/232283/c5833fd5-2ab7-495f-9002-4e763e468d77
I would be grateful for any pointers. I've copied the main parts of my code below...
Editor.tsx
EditorToolbar.tsx
EditorToolbarToggleItem.tsx
EditorMarkToolbarButton.tsx
Funding
The text was updated successfully, but these errors were encountered: