Closed auromota closed 1 year ago
Use doc: { content: "paragraph+" }
instead of "paragraph*"
. This is caused by the original text being inserted outside of a textblock, which apparently causes the android browser to do weird things with the selection as the wrapping block node is added.
Hi there!
When you load the input and type something for the first time (and only the first time, I believe), it will automatically create a selection for the first letter you just typed in. When you enter the second letter, it will override the first letter, since there was a selection in the first letter. After this, the bug doesn't seem to happen again, unless you refresh your browser. In the end, we have this weird behavior, where if you type "Swim", you'll end up getting the word "Wim".
I created this minimum project to reproduce the bug. https://codepen.io/aurofmota/full/jOeJKMR
In the following video, I typed "Asd" and got "Sd" in the end. https://github.com/ProseMirror/prosemirror/assets/7283335/826e5195-1d08-4d29-9783-87684137a172
I tried in a few different devices and it won't happen on every one of them, but it's consistently happening on the ones I could reproduce. iOS seems to be working just fine.
List of devices where the bug happens:
Thanks, Auro.