You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When I started editing a new document, I detected two bugs.
First bug. The last div tag in the document disappears when the delete key is continuously entered on an empty TAB. At this point, if I type in the text and enter, the content will not wrap.
The second bug, or in a blank document, if I hit the enter key continuously, it will produce multiple blank lines, at this time, if I use the delete key to delete these empty lines, the deletion operation will not take effect.
I analyzed your code and found a mistake in your logic when dealing with the delete key. Therefore, the above two bugs are generated. Hopefully it will be fixed soon.
Screenshots
The text was updated successfully, but these errors were encountered:
Thanks a lot for reporting. Ok I acknowledge both bugs.
This is what we end up with when we have to make dirty hacks like this for trying to manage the contenteditable behaviour 😣
Indeed you pointed out the right code which we have to rewrite. So we have to:
Prevent user action when the content[0] is empty (also <div></div> or <div><br></div> must be considered empty)
Not prevent user action when the content[0] is not empty (several <br> or spaces / tabs makes it non-empty)
Make sure the content is always contained in one or more <div> containers (some user actions manage to remove the root <div>), otherwise it prevents the user ENTER key input (or it breaks the page overflow management).
I'm not sure how to do this in the best way, and it needs lots of testing on different web browsers. But it must be feasible.
I must finish urgent ongoing projects right now, so I can't look at it before a month from now, I'm sorry.
In the meantime if you have time you are welcome to contribute and send a pull request, you will be marked as contributor 🙌
Hi @imhuntun your issue should now be fixed in v2.3.2 (Vue3) and v1.5.2 (Vue2). I had to rewrite code which finally led to remove the keydown function you pointed out entirely. Please let me know if you still have issues.
Describe the bug
When I started editing a new document, I detected two bugs.
First bug. The last div tag in the document disappears when the delete key is continuously entered on an empty TAB. At this point, if I type in the text and enter, the content will not wrap.
The second bug, or in a blank document, if I hit the enter key continuously, it will produce multiple blank lines, at this time, if I use the delete key to delete these empty lines, the deletion operation will not take effect.
I analyzed your code and found a mistake in your logic when dealing with the delete key. Therefore, the above two bugs are generated. Hopefully it will be fixed soon.
Screenshots

The text was updated successfully, but these errors were encountered: