PDA

View Full Version : TreePanel enableEdit bug



doU
26 Mar 2007, 5:18 AM
Code:


var tree = new Tree.TreePanel('tree-container', {enableEdit: true});


FireBug: tree is not defined TreePanel.js (225)

Fix:


// listen for a click on a node that is already selected
// and start editing. return false to cancel the default click action.
this.on('beforeclick', function(node){
if(this.getSelectionModel().isSelected(node)){
ge.node = node;
ge.startEdit(node.ui.getAnchor(), node.text);
return false;
}
});