cannot do postback with HtmlEditorExtender and ie11


Found a postback problem because of the JavaScript runtime error: Invalid argument in the _editableDiv_submit of the htmleditor when using internet explorer 11.

The page didn't postback with ie11 and the htmleditor together because it found a problem in sel.collapse(this._editableDiv.firstChild, char) of the _editableDiv_submit

because didn't have much time I decided to temporary fix the function with the below:
if (!!navigator.userAgent.match(/Trident\/7\./) && Sys.Extended && Sys.Extended.UI && Sys.Extended.UI.HtmlEditorExtenderBehavior &&
    Sys.Extended.UI.HtmlEditorExtenderBehavior.prototype && Sys.Extended.UI.HtmlEditorExtenderBehavior.prototype._editableDiv_submit) {
    Sys.Extended.UI.HtmlEditorExtenderBehavior.prototype._editableDiv_submit = function () {
        var char = 3;
        var sel = null;
        setTimeout(function () {
            if (this._editableDiv != null)
        }, 0);                     
        this._textbox._element.value = this._encodeHtml();
Closed May 19 at 10:07 AM by fadilmamedov


petrozio wrote Dec 10, 2013 at 1:11 PM

I have also have this problem.

travissmithv1 wrote Jan 14, 2014 at 6:28 AM

I have this problem also.

thrsht wrote Feb 6, 2014 at 6:36 PM

Me too

mohanjava wrote Mar 11, 2014 at 7:17 PM

Yes, I am also facing the problem with Win 8 Pro (64bit) IE 11. Firefox is working fine.

Please help us to fix.


sraspnet wrote May 8, 2014 at 10:35 PM

I have this problem too.

I would like to try this temporary fix. Where am I supposed to add this piece of code?


jaymz7783 wrote Jul 30, 2014 at 11:03 PM

Also an error in Chrome, only Firefox is omitted from this

cwalls wrote Aug 9, 2014 at 2:53 PM

As with the others, I too am having this problem. How do I go about patching the code with the sample above?

cwalls wrote Aug 9, 2014 at 3:27 PM

Ahh, okay. I added the JS to the bottom of my page and all is now well.

CroozerBroozer wrote Aug 31, 2014 at 6:33 PM

Thanks for fix! It solved the problem.

RWelu wrote Apr 28 at 9:35 PM

Just upgraded to v15 and experienced the same issue with IE 11. Implemented all the static scripts so that I could get at the JavaScript and commented out the line below for a workaround.
    if(Sys.Browser.agent != Sys.Browser.Firefox) {
        if (document.selection) {
            sel = document.selection.createRange();
            sel.moveStart('character', char);
        } else {
            sel = window.getSelection();
           // sel.collapse(this._editableDiv.firstChild, char);

fadilmamedov wrote May 19 at 10:06 AM

This issue will be fixed in the future release. Related changeset 3f2a2942a0ca.
Until the next release is provided, you can use a workaround suggested in ticket 27547.