Could not complete the operation due to error 800a025e

Petah picture Petah · Apr 23, 2013 · Viewed 7.7k times · Source

What does this error mean in IE10/11:

Error: Could not complete the operation due to error 800a025e. 

And how would I debug it?

It says its this line:

this.nativeSelection.removeAllRanges();

https://code.google.com/p/rangy/source/browse/trunk/src/js/core/wrappedselection.js#416

See it in action here: http://panmedia.github.io/raptor-editor/tests/cases/selection/selection-expand.html

Answer

kryssi picture kryssi · Oct 22, 2015

I had this error coming up recently, I fixed it with the following chceck:

var sel = window.document.getSelection();
if (sel.rangeCount > 0 && sel.getRangeAt(0).getClientRects().length > 0) {
    sel.removeAllRanges();
}