marktext / muya

📄 Future markdown editor for web browser applications development

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Code block cursor confusion problem

Jocs opened this issue · comments

  • Searched existing issues to avoid creating duplicates.

  • Confirmed that it can be reproduced in muya.


Describe the bug
Typing too fast in a codeblock causes a cursor error

To Reproduce
Steps to reproduce the behavior:

  1. Create a javascript code block
  2. type JS codes bellow:
const a = '4'
function add(){}

Expected behavior
The code is entered normally

Actual behavior

Uncaught DOMException: Index or size is negative or greater than the allowed amount

Operation System and Browser version (please complete the following information):

  • OS: [e.g. macOS 13.5 (22G74)]
  • Browser: firefox only

Muya Version
e.g: 0.10.11