Fixed bug with insert image file in IE when using getSelection caused by range not supporting parentElement.