I'm using the following to initiate in-line editing of a tree item label:
jQuery("#tree_control").tree( { onDblClick: function(node){ jQuery(this).tree('beginEdit',node.target); } });
This works fine. Currently, I have to press the "return" key my keyboard to exit editing mode. Is there a way to exit editing by clicking on a different tree item, or anywhere else on the tree? I tried to use the following call when clicking on a tree item, and my code fails to execute the function:
var selected_node = jQuery("#tree_control").tree('getSelected');
jQuery("#tree_control").tree('endEdit',selected_node.id); // - FAILS TO EXECUTE
jQuery("#tree_control").tree('endEdit',selected_node.target); // - FAILS TO EXECUTE
Your help is appreciated!
Thanks.