ianstormtaylor / slate

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

CJK will output duplicated and crash on Firefox.(same on slatejs.org) #5014

Open bingluen opened 2 years ago

bingluen commented 2 years ago

Description slatejs can't working correctly with CJK IME on Firefox. May output duplicated and crash on Firefox

Recording https://user-images.githubusercontent.com/6832868/170954162-ec267ece-5d5f-4bba-a9d7-cbfa8cb37a0e.mov

Steps To reproduce the behavior:

  1. Open https://www.slatejs.org/examples/richtext
  2. Select all default text, and delete it.
  3. Typing any CJK text
  4. CJK text be duplicated.
  5. Try to delete duplicated text (i.e. any operation that delete the dom that contain duplicated text)

Expectation working correctly.

Environment

Context Error message:

Cannot resolve a DOM point from Slate point: {"path":[0,0],"offset":7}

Is there exists some issue when slate updating DOM data ?

On Chrome 100, when typing CJK text at end of hyperlink, then CJK text will be duplicated or break IME composition during typing, and crash randomly.

podvarkov commented 2 years ago

Hi, any updates on this issue?