Dragging lags and gets stuck
If a user moves a div fast enough that the cursor hovers over a button or link it will break the drag until the div is clicked to reset.
Not sure that jQuery is being used, but this might help: https://stackoverflow.com/questions/5758090/dragging-a-div-in-jquery-fine-when-mouse-is-slow-but-fails-on-fast-mouse-move
@ThisGuyRghtHereee Thanks for your suggestions! But I could not reproduce this issue. Currently, my implementation is similar with the solution you mentioned.
Not sure, but I'm still having the issue. Not limited to my computer, and I am not running any ambiguous code... I don't know why I would get lag, or loss of control of the drag. I'm suggesting maybe there might be a bug with how you are watching the cursor.
I have been noticing the "getting stuck" behavior occasionally with using multiple draggable divs simultaneously, often when partially overlapping. I'm still trying to puzzle through it myself. @ThisGuyRghtHereee, not sure if you still have this issue, but are you sure it doesn't have to do with
- The positioning and/or overlap of your draggable elements?
- Is it possible that the user agent style sheet for some elements is preventing dragging, or is this just a plain empty div?
Also, don't be afraid to crack open the directive and take a quick read. It's pretty easy to get a feel for how it works. I found that it was a much thinner directive than I expected :)
The div is on top of all elements on the page, and it is the only container with drag functionality on it.
As to what's preventing dragging, there is a button and some text in the div. The button disables on the drag start event. And re-enables when stopped.
This is the div (in yellow)
It works fine until I try and move the mouse at a slightly faster speed.
Playing with it a little more, it looks like it stops if the cursor move too fast and hovers over something other than the div itself, including whatever is behind it outside of the div, and the disabled button when it's being dragged. The cursor should be watched once it starts dragging the div, and watch the position regardless of what it's over until it is let go.
Any update on this? Experiencing the same issue.