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

Two undo steps after embed image and reattach editor to DOM #4644

Open
sculpt0r opened this issue Apr 27, 2021 · 0 comments
Open

Two undo steps after embed image and reattach editor to DOM #4644

sculpt0r opened this issue Apr 27, 2021 · 0 comments
Labels
plugin:embed 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. type:bug A bug.

Comments

@sculpt0r
Copy link
Contributor

Type of report

Bug

Provide detailed reproduction steps (if any)

Extracted from: #4481 (review) (Scenario 2) & #4601 (comment)

  1. Insert an image to the editor.
  2. Detach and reattach editor

Expected result

There is only one undo step in history.

Actual result

There are two undo steps.

Other details

The first and second ones are different by bookmark in Image. So our content Images comparison

if ( this.currentImage ) {
if ( image.equalsContent( this.currentImage ) ) {
if ( onContentOnly )
return false;
if ( image.equalsSelection( this.currentImage ) )
return false;
} else if ( autoFireChange !== false ) {
editor.fire( 'change' );
}
}
treats both content Images as different.

There are situations when the double toggle "Source mode" fix this issue.

This bug is introduced by #4462 #4601

  • Browser: ANY
  • OS: -
  • CKEditor version: 4.17.0 (pre release)
  • Installed CKEditor plugins: undo
@sculpt0r sculpt0r added type:bug A bug. status:confirmed An issue confirmed by the development team. plugin:embed The plugin which probably causes the issue. plugin:undo The plugin which probably causes the issue. size:? labels Apr 27, 2021
@jacekbogdanski jacekbogdanski changed the title Two undo steps after embed image and reattach editor to DOM. Two undo steps after embed image and reattach editor to DOM Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin:embed 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. type:bug A bug.
Projects
None yet
Development

No branches or pull requests

2 participants