1 person found this helpful
If you are calling a doDrag method immediately on mouse down, then focus will be removed from the button and pushed onto the dragproxy. On mouse down, you need to defer the drag method until the user actually moves the mouse while the mouse button is down. You might add an event listener for MouseMove and MouseUp, on the MouseDown event, and remove those listeners on MouseUp or MouseMove. Once you hit the handler for the MouseMove event, you know the user is dragging, and not doubling clicking.
A word of advice would be to add in additional logic to look for pixel offsets prior to deciding that your user is not double clicking, but instead attempting to drag. In this case, on mouse down you would trap the original MouseX and MouseY and store those values locally. Then you wait until your user has moved the mouse while the button is down at least 3-5 pixels in any direction before starting the drag. The reason is that if you only look for mouseMove, the user might have accidentally moved the mouse 1 pixel in the middle of a click (e.g. when the mouse button was actually down) and thus did not really mean to drag.
I made it workable for a time being using MOUSE_MOVE (It is adding overhead to my application)
But will try with maintaining X, Y position for sure. I guess that will work perfectly.