Replies: 1 comment 2 replies
-
Can you reproduce the problem on Plate's website, or with vanilla Slate? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When pressing backspace on an empty editor (in iOS), it deletes the entire Slate DOM structure inside my editor, which eventually crashes after. Any idea why this is happening? I tried deleting all plugins and it still happens. Ideally, if there's no more text, it should not delete the default
<p>
tag and underlying Slate elements, but it does so any way.See below:
How an empty editor DOM looks before pressing backspace
How it looks after pressing backspace (the entire DOM inside `contenteditable is empty)
I'm using PlateJS v36.x. I added a keydown handler and returned false if
editor.children = [{ type: p, children: [{ text: '' }] }]
this works but there has to better way? Would like to know what's causing this on iOS? Works fine on other platforms.Beta Was this translation helpful? Give feedback.
All reactions