Opened 10 years ago
Last modified 10 years ago
#13081 confirmed Bug
[Widgets] Excessive snapshot is recorder if blurred and focused editor — at Version 1
Reported by: | Piotrek Koszuliński | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 4.4.0 |
Keywords: | Cc: |
Description (last modified by )
- Open http:///ckeditor.dev/plugins/image2/samples/image2.html
- Open image dialog. Type any URL and press ok.
- Click outside editor (select some text).
- Doubleclick the created widget.
- Change alignment and press ok.
- Press CTRL+Z - the previous alignment should be restored (OK).
- 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.