react-md-editor icon indicating copy to clipboard operation
react-md-editor copied to clipboard

长按BackSpace删除连续文本会引发错误

Open Vang-z opened this issue 3 years ago • 2 comments

如题,在任何有大段文本的情况下长按backspace键删除本文,都会引起渲染错误,并且编辑框中的文本也不会被正常删除。 Warning: Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.

Vang-z avatar Jun 08 '22 07:06 Vang-z

@Vang-z wo 我没有重现你的问题,是否能使用 codesandbox.io 提供示例重现你的问题?

https://codesandbox.io/embed/markdown-editor-for-react-izdd6?fontsize=14&hidenavigation=1&theme=dark

jaywcjlove avatar Jun 08 '22 15:06 jaywcjlove

@Vang-z wo 我没有重现你的问题,是否能使用 codesandbox.io 提供示例重现你的问题?

https://codesandbox.io/embed/markdown-editor-for-react-izdd6?fontsize=14&hidenavigation=1&theme=dark

很抱歉,因为疫情原因和自身问题耽搁了很久,这是我作的一个复现,可能是由于我自身项目的问题才会引起渲染报错,在sandbox中仅只是引起不能同步渲染的问题并不会报错。 文本信息是直接从uiwjs中摘取的,可以在视频中观察到点按backspace不会有任何影响,但是长按backspace就会产生问题

https://user-images.githubusercontent.com/44422499/178628771-b0f48b3b-31eb-45ec-a675-3801bb0a11e5.mp4

Vang-z avatar Jul 13 '22 01:07 Vang-z