react-codemirror icon indicating copy to clipboard operation
react-codemirror copied to clipboard

select some word and enter chinese, it will error

Open luzhiy123 opened this issue 1 year ago • 8 comments

https://codesandbox.io/s/happy-dew-qw53pj?file=/package.json

the basic codemirror 4.21.9 when I select multiline word (not all) and entry Chinese word;

sometimes it will error like“ Position 406 is out of range for changeset of length 397"

luzhiy123 avatar Aug 17 '23 08:08 luzhiy123

@luzhiy123 I cannot reproduce your error.

jaywcjlove avatar Aug 17 '23 09:08 jaywcjlove

https://github.com/uiwjs/react-codemirror/assets/13360151/3dfee735-be7c-48b9-b4bb-8a38a7eaa853

@jaywcjlove

luzhiy123 avatar Aug 17 '23 11:08 luzhiy123

@luzhiy123 https://codesandbox.io/embed/immutable-field-ng8g9d?fontsize=14&hidenavigation=1&theme=dark

Upgrade react v18

jaywcjlove avatar Aug 17 '23 12:08 jaywcjlove

image

luzhiy123 avatar Aug 17 '23 12:08 luzhiy123

@jaywcjlove react18 has the same error

luzhiy123 avatar Aug 17 '23 12:08 luzhiy123

https://github.com/uiwjs/react-codemirror/assets/1680273/0b798daf-e70a-4433-83e4-ae291cf61a4c

@luzhiy123

https://codesandbox.io/embed/immutable-field-ng8g9d?fontsize=14&hidenavigation=1&theme=dark

jaywcjlove avatar Aug 17 '23 13:08 jaywcjlove

@jaywcjlove 步骤不对 1.切换中文输入法 2.一次选中跨行的两行文字 且不能选择第一行的开头和第二行的末位 3.然后输入字符,超过3个字母就非常大的概率复现,

luzhiy123 avatar Aug 17 '23 13:08 luzhiy123

截屏2023-08-17 21 40 19 截屏2023-08-17 21 40 37

luzhiy123 avatar Aug 17 '23 13:08 luzhiy123