Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by abrauer on Jan 16, 2009 03:26
open dhtmlx forum
OnClickHandler not called when using drag-and-drop

Hi,

I have created a tree and attached a handler via setOnClickHandler.
As long as I directly cklick nodes in the tree my handler is called.
But when I click a node and drag it, the handler is not called!

This is a problem when I first select some node "A" (handler is called)
and then drag-and-drop another node "B" to some other place,
then the handler is not called.
After drag-and-drop is finished "B" is selected but my program doesn't know!

Is there a solution for this issue?

Thanks
Answer posted by Support on Jan 16, 2009 04:33
This is expected result , the event occurs for the direct click only. 
You can use onBeforeDrag event in addition to onClick - it occurs when mouse button pressed and drag started.
Answer posted by abrauer on Jan 16, 2009 04:53
thank you for the fast reply, this helps