-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Typing's undo step should be broken by applying an attribute #3043
Comments
I noticed, that undo operation deletes just part of the text typed in step 4 above, when typed text is quite long (dozen or more characters). |
That's the expected result. It's so called undo step – https://github.com/ckeditor/ckeditor5-typing/blob/7c446342e8a742b77ab260ad4a7f22d51b58e0b8/src/input.js#L36 |
I kind of suspected this. Thanks for pointing out the actual piece of code responsible for that. |
Prototype of solution is available in t/21 branch. Listener of Listening to This prototype also fixes problem when changing selection: https://github.com/ckeditor/ckeditor5-typing/issues/20. |
Pushed changes to t/21. The only thing missing are unit/integration input tests. Since ckeditor/ckeditor5-typing#48 with |
Fix: New undo step should be created on selection change or applying an attribute. Closes #20. Closes #21.
Only the letters typed in step 4 should be undone.
This issue is very similar to #3042. Changing selection attributes should reset a buffer, just like moving the selection should.
The text was updated successfully, but these errors were encountered: