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

Clicking to drag items triggers the behavior of the clicked elements #4

Open
zhouzi opened this issue Feb 19, 2016 · 1 comment
Open

Comments

@zhouzi
Copy link

zhouzi commented Feb 19, 2016

When press mouse down to drag an element, the behavior of the clicked element is triggered. Which might end up in submitting a form, opening a dropdown, ... I think it'd be cool to prevent that.

P.S: Great job with dragon.js, that's definitely something that designers are going to love. I'm giving it a try and wanted to raise some of the issues I faced - I might contribute too ^^

@tomhodgins
Copy link
Owner

Hi @zhouzi, originally (and in the version visible in the Youtube video) tapping things like links sometimes clicked them, but since then I have added:

document.addEventListener("click",function(e){e.preventDefault()})

...which should block this behavior. If you have an outdated bookmark you'll have to replace it with the newer version. If you just want to quickly test if the new version works, check out http://staticresource.com/dragon/ and try to click on the purple link to dragon.js in that second paragraph to test if clicking links is prevented. Dragon is loaded on the test page so you don't need to run the bookmarklet to drag things around on this page.

Hope this helps, thanks for your interest :D

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

No branches or pull requests

2 participants