slate
slate copied to clipboard
Input Chinese character when selection is expanded will cause error
Description Chinese input cause DOM structure broken rendered by slate
Recording recording
Sandbox Slate demo: https://www.slatejs.org/examples/richtext
Steps To reproduce the behavior: Install Baidu Chinese Input on windows
- Go to 'https://shurufa.baidu.com'
- download Chinese input and install on windows
Error produced on slate demo
- Go to 'https://www.slatejs.org/examples/richtext'
- Input two paragraphs at anywhere
- Switch to Baidu Chinese input installed previously
- Select all texts in first paragraph and input a character, say "d"
- Press "Enter" to cancel Chinese input
- The second line of texts is merged with letter "d" and if you check the dom structure you'll find it broken already
- Inputing any Chinese character will cause error which can be seen in console
Expectation When press "d" the second line of texts shouldn't be merged with the letter "d" and all input afterwards should not cause any errors. I perform the same steps on Draftjs, Quilljs and ProseMirror, they all perform as expected.
Environment
- Slate Version: 0.82.0
- Operating System: windows 10
- Browser: Chrome