Index: /CKEditor/trunk/_source/plugins/undo/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/undo/plugin.js	(revision 7413)
+++ /CKEditor/trunk/_source/plugins/undo/plugin.js	(revision 7414)
@@ -411,11 +411,19 @@
 		restoreImage : function( image )
 		{
+			// Bring editor focused to restore selection.
+			var editor = this.editor,
+				sel;
+
+			if ( image.bookmarks )
+			{
+				editor.focus();
+				// Retrieve the selection beforehand. (#8324)
+				sel = editor.getSelection();
+			}
+
 			this.editor.loadSnapshot( image.contents );
 
 			if ( image.bookmarks )
-			{
-				this.editor.focus();
-				this.editor.getSelection().selectBookmarks( image.bookmarks );
-			}
+				sel.selectBookmarks( image.bookmarks );
 			else if ( CKEDITOR.env.ie )
 			{
