Opened 9 years ago

Last modified 9 years ago

#13081 confirmed Bug

[Widgets] Excessive snapshot is recorded if blurred and focused editor

Reported by: Piotrek Koszuliński Owned by:
Priority: Normal Milestone:
Component: General Version: 4.4.0
Keywords: Cc:

Description (last modified by Piotrek Koszuliński)

  1. Open http:///ckeditor.dev/plugins/image2/samples/image2.html
  2. Open image dialog. Type any URL and press ok.
  3. Click outside editor (select some text).
  4. Doubleclick the created widget.
  5. Change alignment and press ok.
  6. Press CTRL+Z - the previous alignment should be restored (OK).
  7. Press CTRL+Z:
    • Expected: the widget should be removed.
    • Actual: You need to press CTRL+Z twice.

The reason why this happens is that initially snapshot contains widget classes in the following order:

 cke_widget_focused cke_widget_selected

Unfortunately, once editor is blurred, the cke_widget_focused class is removed and when it's added back (on editor focus, on doubleclick) it's added at the end.

The solution would be to always add cke_widget_focused class after cke_widget_selected.

Reproduced on Chrome.

Change History (3)

comment:1 Changed 9 years ago by Piotrek Koszuliński

Description: modified (diff)

comment:2 Changed 9 years ago by Piotrek Koszuliński

Summary: [Widgets] Excessive snapshot is recorder if blurred and focused editor[Widgets] Excessive snapshot is recorded if blurred and focused editor

comment:3 Changed 9 years ago by Jakub Ś

Status: newconfirmed
Version: 4.4.0

I was able to reproduce this issue from CKEditor 4.4.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy