ckeditor / ckeditor4

The best enterprise-grade WYSIWYG editor. Fully customizable with countless features and plugins.
https://ckeditor.com/ckeditor-4
Other
5.79k stars 2.48k forks source link

Fix undo in single cell when using tab key #5407

Closed KarolDawidziuk closed 1 year ago

KarolDawidziuk commented 1 year ago

What is the purpose of this pull request?

Bug fix

Does your PR contain necessary tests?

All patches that change the editor code must include tests. You can always read more on PR testing, how to set the testing environment and how to create tests in the official CKEditor documentation.

This PR contains

Did you follow the CKEditor 4 code style guide?

Your code should follow the guidelines from the CKEditor 4 code style guide which helps keep the entire codebase consistent.

What is the proposed changelog entry for this pull request?

* [#4829](https://github.com/ckeditor/ckeditor4/issues/4829): Fix: Undo reverse entire table content instead of single cell.

What changes did you make?

In the tab plugin implementation, the canUndo flag has been set to false in the selectNextCellCommand() function. Setting it to "true" solved the problem of being able to undo only one cell instead of the entire table when using the Tab key to move between cells.

Which issues does your PR resolve?

Closes #4829.