Ext.tree.TreeEventModel.prototype = {\r
initEvents : function(){\r
var t = this.tree;\r
- \r
+\r
if(t.trackMouseOver !== false){\r
t.mon(t.innerCt, {\r
scope: this,\r
},\r
\r
trackExit : function(e){\r
- if(this.lastOverNode && !e.within(this.lastOverNode.ui.getEl())){\r
- this.onNodeOut(e, this.lastOverNode);\r
+ if(this.lastOverNode){\r
+ if(this.lastOverNode.ui && !e.within(this.lastOverNode.ui.getEl())){\r
+ this.onNodeOut(e, this.lastOverNode);\r
+ }\r
delete this.lastOverNode;\r
Ext.getBody().un('mouseover', this.trackExit, this);\r
this.trackingDoc = false;\r
}\r
+\r
},\r
\r
delegateClick : function(e, t){\r
if(this.getNodeTarget(e)){\r
this.onNodeDblClick(e, this.getNode(e));\r
}else{\r
- this.onContainerEvent(e, 'dblclick'); \r
+ this.onContainerEvent(e, 'dblclick');\r
}\r
}\r
},\r
if(this.getNodeTarget(e)){\r
this.onNodeContextMenu(e, this.getNode(e));\r
}else{\r
- this.onContainerEvent(e, 'contextmenu'); \r
+ this.onContainerEvent(e, 'contextmenu');\r
}\r
}\r
},\r
- \r
+\r
onContainerEvent: function(e, type){\r
- this.tree.fireEvent('container' + type, this.tree, e); \r
+ this.tree.fireEvent('container' + type, this.tree, e);\r
},\r
\r
onNodeClick : function(e, node){\r
},\r
\r
beforeEvent : function(e){\r
- if(this.disabled){\r
+ var node = this.getNode(e);\r
+ if(this.disabled || !node || !node.ui){\r
e.stopEvent();\r
return false;\r
}\r