onDrag fires regardless of being outside of it's limit#1020

Labels

Milestone

Assignee

4 participants

Hi, discussed this a bit on #mootools, but it's good to get some more feedback about whether this is expected behaviour or not, so here goes:

The "issue" occurs when creating a Drag instance and attaching a limit to it. If you then try to drag the element outside of it's limit, the element itsself will halt nicely, however, onDrag will keep firing as long as you hold the mouse button and move the mouse around. For me, expected behaviour would be that onDrag only fires if the actual element moves.

Technically, "dragging" describes the action, not the response to the action. So if you're moving your mouse while holding the mouse button down, it's dragging regardless of whether the item actually reacts to the drag or not.

Another way we could look at is, adding another event. One that fires only when the actual element moves. One with less ambiguous naming, perhaps, even though I can't think of anything right this moment.