﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
13081	[Widgets] Excessive snapshot is recorded if blurred and focused editor	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."	Bug	confirmed	Normal		General	4.4.0			
