Open TianYu0605 opened 2 months ago
Enter some English first, then enter Chinese, and you can enter and delete normally. https://github.com/user-attachments/assets/96e7f308-f152-44cc-bc93-450d3d13f183
I looks like safari will break slate's dom structure at beforeinput event inputType = deleteCompositionText
.
there is a workaround to trick safari which mentioned at https://github.com/ProseMirror/prosemirror/issues/934
It works for me, you can give it a shot.
And this bug was brought in at this PR https://github.com/ianstormtaylor/slate/pull/5654.
Description I used Safari on my iPhone to open the example(https://www.slatejs.org/examples/richtext) provided by Slate, and found that I could not input Chinese. The following is the error I got when I opened it with the iOS simulator. At the same time, I found that if I used English as the first word and Chinese as the subsequent words, it could be input normally.
Recording When the editor value is empty, entering Chinese will result in an error and cannot be deleted. https://github.com/user-attachments/assets/61c6f15c-db26-46cd-a2b4-065771552009 Enter some English first, then enter Chinese, and you can enter and delete normally. The following is the error information:
Expectation I hope that when the editor is empty, I can input Chinese normally and the console will not report an error.
Environment