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

How to make controls clickable #37

Closed
tsch1 opened this issue Sep 23, 2013 · 1 comment
Closed

How to make controls clickable #37

tsch1 opened this issue Sep 23, 2013 · 1 comment

Comments

@tsch1
Copy link

tsch1 commented Sep 23, 2013

I use Packery.js together with Dragabilly. Inside the container I have <select> tag.

When I click anywhere on the container, drag event starts. Also on child elements. This prevents drop down from opening. Example under this link:

http://jsfiddle.net/Tschareck/tXdqw/1/

How can I override dragging, and instead open dropdown or fire Button event, when I click on it?

@desandro
Copy link
Owner

Good question! The trick is to use handle so that it takes up as much space as the draggable parent, but sits behind all other non-draggable stuff. See back handle example on CodePen http://codepen.io/desandro/pen/znAuH

I updated your example with this technique http://jsfiddle.net/desandro/tXdqw/5/

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