IE 11 document.selection not working

I am trying to deselect selected content in an HTML editor.

I used the selection.empty() function to deselect content that works fine before IE10, but it doesn't work in IE11. In addition, the create function does not work in IE11

Is there an alternative function for this?

0
internet-explorer internet-explorer-10 internet-explorer-11
Feb 14 '14 at 11:09
source share
1 answer

IE11 has replaced the legacy API with a more standard API.

selection no longer supported. Starting with Internet Explorer 11, use getSelection .

See Compatibility Changes in IE11 .

Now an HTMLSelection object is returned , which is different from the old selection and it does not look like empty is a valid method in the new API. We hope that the new API will have methods that allow you to execute the same logic.

+4
Feb 14 '14 at 12:26
source share



All Articles