Skip to content

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

Closed
chielkunkels opened this Issue Sep 8, 2011 · 6 comments

4 participants

@chielkunkels

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.

Discuss! :)

@keeto
MooTools member
keeto commented Sep 9, 2011

Tricky. 🔥

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.

I'm not sure how to actually handle this particular case.

@chielkunkels

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.

@arian
MooTools member
arian commented Sep 9, 2011

onMove?

@chielkunkels

@arian: sounds good, I think that would clear up any ambiguity, and give a more "usefu;" event (in my case). :)

@chielkunkels

Any update on this, btw? :)

@SergioCrisostomo
MooTools member

Closing due to inactivity, if the discussion should be re-started we can reopen this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.