You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
I want to clear textarea on Enter. When I do so, slate throws an error: Cannot resolve a DOM point from Slate point: {"path":[0,0],"offset":3}
Description
I want to clear textarea on Enter. When I do so, slate throws an error:
Cannot resolve a DOM point from Slate point: {"path":[0,0],"offset":3}
Recording
![slate](https://user-images.githubusercontent.com/3890785/135562564-2e726f2f-1996-45ee-bde3-db2cf2ffdf22.gif)
Sandbox
https://codesandbox.io/s/slate-0-5x-forked-kr8sc?file=/src/App.tsx
Steps
To reproduce the behavior:
Expectation
I shouldn't get an error. I'm guessing it tries to preserve caret position across updates and fails because the new content is shorter.
Environment
slate@0.66.5
,slate-react@0.66.4
The text was updated successfully, but these errors were encountered: