Jump to content
GreenSock

boynet

draggable with dragClickables:on prevents some textarea shortcuts

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

when there is a input or textarea inside draggable element with 

type:"x",
dragClickables:true,

shortcuts like ctrl+a not working.

 

tested on chrome 56.0.2924.87

 

googling about it I saw this issue https://github.com/react-dnd/react-dnd/issues/178 it seems like the bug is because of listening to selectstart

 

 

 

See the Pen xqPOmw by anon (@anon) on CodePen

Link to comment
Share on other sites

Hi  its have some similarity but I believe its a different bug about ctrl+a inside textarea when the textarea is inside a draggable element when dragClickables:true,

 

I can verify that draggable is listening to selectstart and when removing this listener ctrl+a is working great..

 

I put a link to a github issue on other library but referencing the same selectstart event bug

Link to comment
Share on other sites

  • Solution

To prevent selecting text outside of the textarea, you could do something like this in the onPress callback.

See the Pen QpOGBp?editors=0010 by osublake (@osublake) on CodePen

  • Like 2
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.
×