PDA

View Full Version : [UNKNOWN][3.??] Ext.tree.TreeEventModel produces errors in Firefox



xpuu
28 Jul 2009, 9:10 AM
I am using TreePanel in my application and I sometimes intercept an error just because of moving a mouse around from TreePanel to a different component and back again...

It starts with warning Permission denied to...LDivElement.nodeType in ext-base-debug.js caused by this function...


1993 var isTextNode = Ext.isGecko ? function(node){
1994 try{
1995 return node.nodeType == 3;
1996 }catch(e) {
1997 return false;
1998 }

... which is ok, because it's handled by try/catch block, but as a result of this, there's a problem in delegateOut method of Ext.tree.TreeEventModel. See stacktrace and code below...


(?)()
resolveTextNode()
getRelatedTarget()
getRelatedTarget()
within()
delegateOut()
h


44968 delegateOut : function(e, t){
44969 if(!this.beforeEvent(e)){
44970 return;
44971 }
44972 if(e.getTarget('.x-tree-ec-icon', 1)){
44973 var n = this.getNode(e);
44974 this.onIconOut(e, n);
44975 if(n == this.lastEcOver){
44976 delete this.lastEcOver;
44977 }
44978 }
44979 if((t = this.getNodeTarget(e)) && !e.within(t, true)){
44980 this.onNodeOut(e, this.getNode(e));
44981 }
44982 },

The trouble is, that this.getNode returns null, which means, that method onNodeOut fails producing error node is null on Line 45052



45051 onNodeOut : function(e, node){
45052 node.ui.onOut(e);
45053 },

Quickestfix for that is as follows, but it's really nasty...


Ext.override(Ext.tree.TreeEventModel, {
onNodeOut : function(e, node){
if (node) {
node.ui.onOut(e);
}
}
}

Cheers,

Martin

mjlecomte
28 Jul 2009, 1:25 PM
For completeness, please state your versions of Ext, Firebug, Firefox.

xpuu
29 Jul 2009, 1:59 AM
Ext version tested:

Ext 3.0.0


Adapter used:

ext


CSS used:

only default ext-all.css


Browser versions tested against:

FF 3.0.12 (firebug 1.4.1 installed)


Operating System:

WinXP Pro

xpuu
29 Jul 2009, 2:36 AM
Btw. I failed to produce some really basic test case, but I hope that from stack trace is quite obvious what's happening...