marktext / muya

📄 Future markdown editor for web browser applications development
MIT License
615 stars 54 forks source link

Code block cursor confusion problem #130

Closed Jocs closed 11 months ago

Jocs commented 11 months ago

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):

Muya Version e.g: 0.10.11