Added selection clearing fallback for IE9 when selection.removeAllRanges fails in the restoreSelection method.