Jump to content
GreenSock

chriswyl

Draggable - pevent start dragg by custom elements.

Go to solution Solved by OSUblake,

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hi,

 

I've two problems

 

1. Why my input checkbox doesn't wroking with custom css styling?

 

2. Is there a way for adding  object(s) for disable dragging ? Maybe usefull will be some propperty Draggable like

exclude:["#someel1","#someel2"]

 

Thanks

 

 

See the Pen mEJEjW by amonk (@amonk) on CodePen

Link to comment
Share on other sites

  • Solution

Look at the docs for dragClickables.

 

dragClickables : Boolean - By default, Draggable will ignore clicks on <a>, <input> <select>,<button>, and <textarea> elements (as well as any element that has a data-clickable="true"attribute), allowing the browser's default behavior (like clicking on an input would give it focus and drop the cursor there to begin typing), but if you want Draggable to hijack those clicks and initiate dragging instead, set dragClickables:true.

 

See the Pen PzqWoN by osublake (@osublake) on CodePen

  • Like 3
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×