View Full Version : cancel Tree expand on dblclick

13 Aug 2007, 6:19 PM
When I dblclick a folder -> I'd like to edit it, not open.

How about checking dblclick event value like it is done for click ?

if (this.fireEvent("dblclick", this.node, e) !== false && !this.animating && this.node.hasChildNodes()) {

Or should I do something tricky like

tree.on('beforeexpand', function(node, event) {
if (event.type == 'dblclick') { DO THE DBLCLICK STUFF; return false; }