Open ngoctu-bic opened 8 months ago
The selection may have some wrong which look like a point should be a range, Is there someone give me some advice to fix it?
This is a bug in slate-react. Related issues: https://github.com/ianstormtaylor/slate/issues/5435, https://github.com/ianstormtaylor/slate/pull/5451.
The error occurs inside toSlatePoint
, where the anchorNode
has been passed in from toSlateRange
as a span HTMLElement instead of a Text node.
Same issue. It also happens when you select text and also an image until the drag handles show up. How can I prevent it from crashing the page?
Description
Steps to Reproduce
https://github.com/udecode/plate/assets/129946813/e821d29c-1c21-4a37-a036-2fb3fff14675
Sandbox
This could be reproduce using demo editor on platejs.org
Expected Behavior
TBD
Environment
Bounty
Click here to add a bounty via Algora.
Funding