PDA

View Full Version : fire onclick but not ondrag



Slapyo
29 Nov 2006, 4:56 PM
I would like to display a dialog onclick and only onclick. But I would like to drag an element around as well. But as soon as I drag it and let go the onclick fires, like it should. Is there anyway I can distinguish between onclick and ondrag so that I can drag the element without having the onclick event occur unless it is clicked without dragging?

tryanDLS
29 Nov 2006, 5:15 PM
Try returning false from your drag event, that should stop event propagation, if you're using the yui-ext event model

Slapyo
29 Nov 2006, 11:11 PM
but only if i use yui-ext event model? right now i am just using .onDrag from yui i think. i'll have to see how to use the yui-ext event model and give it a shot. thanks.