Where dragging and dropping items it seems the onSelect event always fires for each node dragged over.
Is there a way to block the onSelect from firing when doing a drag-n-drop?
regards
Mark
Where dragging and dropping items it seems the onSelect event always fires for each node dragged over.
Is there a way to block the onSelect from firing when doing a drag-n-drop?
regards
Mark
Use method clearSelection()
docs.dhtmlx.com/doku.php?id=dhtm … rselection
tree.attachEvent("onBeforeDrag", function(sId){tree.clearSelection(sId)})
Thanks Darya, I actually saw that the event gets fired from my OnDropEvent
Tree.attachEvent(“onDrop”, function (sId, tId, id, sObject, tObject) {
Tree.selectItem(sId, false, false);
});
The reason I put this here is that I want the node/leaf to have focus once the move is complete, and according to the api the second param I pass to selectItem is false which should block the “onClick” ( and I assume onSelect ) events from firing, however that is not the case?
Any ideas on how I can stop this behavior?
regards
Mark
Hi Guys,
I changed from the onSelect event to the onClick event and that solved all my issues.
regards
Mark
You are welcome!
Darya,
This code causes drag-and-drop to be impossible within the tree.
tree.attachEvent("onBeforeDrag", function(sId){tree.clearSelection(sId)})
Hi, klysiak
Is it issue for you? It is correct behaviour.
Tree draging selected item (selection “remembers” all item’s properties). If there is no no selection - there is no item to drag.