IE 11 document.selection does not work [closed]
I am trying to deselect selected content in HTML editor. I have used selection.empty() function for deselecting content it is working fine up to IE10 but it is not working in IE11. Also the create function is not working in IE11 Is there any alternative function for this? IE11 replaced the legacy API with a more standards-compliant API. selection is no longer supported. Starting with Internet Explorer 11, use getSelection . See Compatibility changes in IE11 . An HTMLSelection object is now returned, which is different to the old selection object and it doesn't look like empty is a valid method