Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Window moves underneath the cursor when starting a drag with representative() #127

Open
chasenlehara opened this issue Oct 5, 2016 · 1 comment

Comments

@chasenlehara
Copy link
Member

When I use representative() to make an element draggable by just its child, the window jumps underneath the cursor such that the window’s top-left corner is under the cursor.

Demo: http://jsfiddle.net/eveLzaaw/2/
representative bug

@chasenlehara
Copy link
Member Author

My original goal was to make a header drag an entire element; I’ve now accomplished this by listening for the dragdown event and canceling any drags that aren’t in the header. Example:

$('#dragger').bind("dragdown", function(ev, drag){
if(ev.target.id == 'draginp'){
drag.cancel();
}else{
ev.preventDefault();
}
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant