Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug report] Cannot read properties of undefined (reading 'length') #401

Closed
xdewx opened this issue Mar 3, 2023 · 1 comment
Closed

Comments

@xdewx
Copy link

xdewx commented Mar 3, 2023

Describe the bug
调用setMarkdown后,在编辑框内无法继续输入,控制台提示:

cherry-markdown.core.js:1 
        
       Uncaught TypeError: Cannot read properties of undefined (reading 'length')
    at kn2 (cherry-markdown.core.js:1:77288)
    at Ln2 (cherry-markdown.core.js:1:78003)
    at jn2 (cherry-markdown.core.js:1:82781)
    at vr2 (cherry-markdown.core.js:1:89638)
    at mr2 (cherry-markdown.core.js:1:89575)
    at Vo2.prepareSelection (cherry-markdown.core.js:1:192796)
    at zr2 (cherry-markdown.core.js:1:103088)
    at cherry-markdown.core.js:1:101808
    at cherry-markdown.core.js:1:101888
    at cherry-markdown.core.js:1:101612

另外可以观察到的是:

  1. setMarkdown后游标的位置和文本位置不一致,如图
    image

To Reproduce
Steps to reproduce the behavior:

  1. init
  2. setMarkdown

Expected behavior
在setMarkdown后可以继续正常输入

Environment (please complete the following information):

  • OS: linux
  • Browser : edge
  • Version:0.8.14
@xdewx
Copy link
Author

xdewx commented Mar 4, 2023

image
从这里找到了解决方式

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant