ianstormtaylor / slate

A completely customizable framework for building rich text editors. (Currently in beta.)
http://slatejs.org
MIT License
29.71k stars 3.24k forks source link

Editor will crash after input Chinese in FireFox #4847

Open M162 opened 2 years ago

M162 commented 2 years ago

Description

Editor will crash after input Chinese and then input something more in FireFox.

Recording

https://user-images.githubusercontent.com/22148349/154881576-b71d7c3c-d81d-4e52-83c1-1a0e3e616c28.mov

Steps

reproduce:

  1. Input something in Chinese like 你好(ni hao) in https://www.slatejs.org/examples/richtext in FireFox.
  2. Then what user input will be repeated.
  3. Input something more in the end of the text in editor.
  4. Then editor will crash

Environment

M162 commented 2 years ago

Any update on this issue?

<p data-slate-node="element" class="StyledElement___StyledDiv-sc-2e063k-0 gxtnvY slate-p">
  <span data-slate-node="text">
    <span data-slate-leaf="true">
    你好
      <span data-slate-string="true">
      你好
      </span>
    </span>
  </span>
</p>

This issue is very similar with #4060 #4142 .

dreammaker7 commented 2 years ago

We also suffer from it and want to know the latest developments.

sennpang commented 2 years ago

https://github.com/ianstormtaylor/slate/issues/4060#issuecomment-770153108

dreammaker7 commented 2 years ago

This problem can be temporarily solved by setting a forced layout. https://www.slatejs.org/examples/forced-layout

cantin commented 1 year ago

The issue seemed to be fixed in the latest version.