PDA

View Full Version : [FIXED][2.x/3.x] IE8 "Type Mismatch" error when Ext.tree.TreeEditor attached to node



johnmmr
29 Apr 2009, 12:35 PM
We are experiencing a different error in IE8. We are getting a "Type Mismatch" error when double clicking on a tree node, which has an Ext.tree.TreeEditor attached, to try and edit the text. See attached images.

jsakalos
29 Apr 2009, 2:26 PM
Does it happen also here: http://remotetree.extjs.eu/ ?

johnmmr
30 Apr 2009, 11:47 AM
Yes, it does happen on this site. I've attached a screenshot of the error after I right clicked and clicked on rename. I get the same "Type Mismatch" error when I double click on the nodes.

jsakalos
30 Apr 2009, 12:59 PM
I've just tested http://remotetree.extjs.eu, rename node in IE7 7.0.5730.13 and it runs w/o any error. Can it be an old cache or an IE extension?

johnmmr
30 Apr 2009, 4:59 PM
Jozef,

This error only shows up in IE8, we are also not seeing the problem in IE7. The first post has the title:

IE8 "Type Mismatch" error when Ext.tree.TreeEditor attached to node

Sorry if there was confusion there.

John

jsakalos
30 Apr 2009, 11:21 PM
Sorry, my bad. Unfortunately, I have no IE8. Anyway, it looks like a bug - do you want me to move this thread to bugs?

Condor
1 May 2009, 12:37 AM
Yes, it's a bug. It tries to call scrollIntoView on a DOM node, expecting the scrollIntoView of Ext.Element to be called.

Fix:

Ext.override(Ext.tree.TreeEditor, {
triggerEdit : function(node, defer){
this.completeEdit();
if(node.attributes.editable !== false){
this.editNode = node;
if(this.tree.autoScroll){
Ext.fly(node.ui.getEl()).scrollIntoView(this.tree.body);
}
var value = node.text || '';
if (!Ext.isGecko && Ext.isEmpty(node.text)){
node.setText(' ');
}
this.autoEditTimer = this.startEdit.defer(this.editDelay, this, [node.ui.textNode, value]);
return false;
}
}
});

johnmmr
1 May 2009, 8:50 AM
Awesome, the fix worked like a charm. Thanks all.

John

evant
2 May 2009, 10:21 PM
Fixed in both branches, thanks.