Closed kiejo closed 1 year ago
Does this patch work for you? (I think I understand what is going wrong, but I don't have an iOS device handy to test.)
The patch works for me on both Android and iOS :+1: Thanks for fixing this so quickly!
Great. Tagged as 1.30.2
Sorry to bring this annoying bug up again, but we're having the same problem with codeblocks which are <pre>
elements with <code>
children. This is the node schema
code_block: {
content: "text*",
marks: "",
group: "block",
code: true,
defining: true,
draggable: false,
parseDOM: [{ tag: "pre", preserveWhitespace: "full" }],
toDOM: () => ["pre", { spellcheck: "false" }, ["code", 0]],
},
Because the <code>
child is a native and inline element, pressing enter within our codeblock on iOS Safari also deletes all the following text. Any suggestions for a workaround or fix?
Steps to reproduce
Result: All text behind the word "can" gets deleted and the caret is placed after the word "This".
Expected behavior: The editor content should stay the same and an Enter keydown event should get dispatched.
Notes
Changing
to
solves the issue (render a
div
tag instead offigcaption
), but it would be really nice if thefigcaption
element could work the same way on mobile.