﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
14337	[IE] Proper selection restoring after modification of text while unfocused	kkrzton		"
In IE (opposite to other browsers) opening dialogs causes loss of focus in editable area. When focus is lost selection is stored ([https://github.com/ckeditor/ckeditor-dev/blob/master/core/selection.js#L957 core/selection.js#L957]) and when focus is gained again by editor, saved selection is restored ([https://github.com/ckeditor/ckeditor-dev/blob/master/core/selection.js#L936 core/selection.js#L936] and [https://github.com/ckeditor/ckeditor-dev/blob/master/core/selection.js#L1650 core/selection.js#L1650]).

The problem is when during the unfocused period something in an editable area is changed (especially in nodes that were selected and are going to be used for restoring). In such case restoring selection produces some unexpected results because of the changes, e.g.

1. Open demo (http://ckeditor.com/demo#full)
1. Remove all sample content
1. Type `test case 1`
1. Select `tes[t case 1]`
1. Press Replace button on the toolbar
1. In the Find what field type: case
1. In the Replace with field type: cc
1. Press Replace All button
1. Press OK button on the notification Message Box
1. Press close button on the Find and Replace dialog

Selection which was restored is:

`tes[t ]c 1`

and probably should be (that's the way it works in other browsers):

`tes[t c 1]`

----

In this particular case the restored selection looks like this because text node where split (while replacing) to:

`test |c| 1`

and saved selection points to first text node with valid startOffset but outdated endOffset (so the selection ends where text node ends). There are also other cases like #12459, #11962.

Happens in IE8 - IE11."	Bug	confirmed	Normal		Core : Selection			IE	
