PDA

View Full Version : IndexSizeError at onFirstFocus() function of htmleditor in IE11



Sebastian79
28 Aug 2014, 12:22 AM
Hi
I am using ExtJs 4.2.1 . I have an htmleditor inside a grid rowexpander. Only in IE11 I am getting IndexSizeError in the onFirstFocus() function at the line selection.getRangeAt(0). This is happening only when the htmleditor is inside rowexpander. If continue then the htmleditor text selection is not working anymore

Please help !!!!!

onFirstFocus: function(){
var me = this,
selection, range;
me.activated = true;
me.disableItems(me.readOnly);
if (Ext.isGecko) { // prevent silly gecko errors
me.win.focus();
selection = me.win.getSelection();

if (!selection.focusNode || selection.focusNode.nodeType !== 3) {
range = selection.getRangeAt(0);

range.selectNodeContents(me.getEditorBody());
range.collapse(true);
me.deferFocus();
}
try {
me.execCmd('useCSS', true);
me.execCmd('styleWithCSS', false);
} catch(e) {
// ignore (why?)
}
}
me.fireEvent('activate', me);
},

mitchellsimoens
4 Sep 2014, 7:53 AM
We don't test adding components within a grid row. Does it work fine if rendered within a form or even rendered to <body>?

Sebastian79
4 Sep 2014, 5:38 PM
Hi
It is working fine outside rowexpander. But inside rowexpander it is not working in IE11. In IE9, 10, FF and Chrome it is working fine inside rowexpander, so we expected the same behavior in coming browser versions too. As we have designed our application in this way it is really difficult to re-code and redesign the application just for IE11 issue. Please help us to find the root cause of this issue in IE11 and suggest a fix
Thank is advance

padraig
6 Nov 2014, 5:55 AM
I'm getting the exact same error message using IE11.

The only reason that you'd get that error is if
if (Ext.isGecko) returns true.

I don't think that IE11 should return true for this.

Oh, I'm using a screen with Ext 3.4.2 for this