Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Open
chielkunkels opened this Issue · 5 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! :)

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@keeto

Tricky. :fire:

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
Owner

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? :)

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.