Skip to content
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

Undo snapshot is overwritten on selectionChange #2780

Closed
jacekbogdanski opened this issue Jan 25, 2019 · 3 comments
Closed

Undo snapshot is overwritten on selectionChange #2780

jacekbogdanski opened this issue Jan 25, 2019 · 3 comments
Assignees
Labels
plugin:copyformatting The plugin which probably causes the issue. plugin:undo The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. target:minor Any docs related issue that can be merged into a master or major branch. type:bug A bug.
Milestone

Comments

@jacekbogdanski
Copy link
Member

Type of report

Bug

Provide detailed reproduction steps (if any)

  1. Open https://ckeditor.com/latest/samples
  2. Change editor content.
  3. Make sure that there is at least a single undo step (undo button is not disabled).
  4. Start clicking around inside editor (at least 20x) changing a selection.
  5. Click undo button.

Expected result

Undo button is enabled and undoes the last change.

Actual result

Undo button is disabled.

Other details

  • Installed CKEditor plugins: Undo
@jacekbogdanski jacekbogdanski added type:bug A bug. status:confirmed An issue confirmed by the development team. plugin:undo The plugin which probably causes the issue. labels Jan 25, 2019
@jacekbogdanski
Copy link
Member Author

It looks like the issue is caused by copyformatting plugin. applyFormatting command is executed on mouseup event. The command is integrated with undo by default, so undo plugin listen on the command execution and creates a snapshot any time it has been used. It should be integrated with undo plugin, however, a snapshot should be created only if content really changed.

https://github.com/ckeditor/ckeditor-dev/blob/d931efee7bb8875e489c172fa3e20de8e8209aef/plugins/copyformatting/plugin.js#L103-L107

I already checked against regression and the only regression I found is the addition of the applyFormatting plugin into the default config file: 9f97b19

@mlewand mlewand added this to the Backlog milestone Jan 30, 2019
@mlewand mlewand added target:minor Any docs related issue that can be merged into a master or major branch. plugin:copyformatting The plugin which probably causes the issue. labels Jan 30, 2019
@msamsel msamsel self-assigned this Jan 30, 2019
@engineering-this
Copy link
Contributor

There is another related issue.

  1. Open sample: http://cdn.ckeditor.com/4.11.2/full-all/samples/
  2. Focus editor and type one letter.
  3. Press undo.
  4. Change editor selection with mouse.

Expected

Redo button is active.

Actual

Redo button is inactive.

@Comandeer Comandeer modified the milestones: Backlog, 4.11.3 Feb 19, 2019
@Comandeer
Copy link
Member

Merged into 4.11.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin:copyformatting The plugin which probably causes the issue. plugin:undo The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. target:minor Any docs related issue that can be merged into a master or major branch. type:bug A bug.
Projects
None yet
Development

No branches or pull requests

5 participants