Jump to content
Search Community

Draggable jumps on first click after animation

jbonlinea test
Moderator Tag

Recommended Posts

Hi there,

 

I've been adding drag functionality to a pen we've been busy with recently.

 

Broadly speaking it works

 

but the draggable element jumps on first after the animation, only if a bounds is defined ?!

 

To reproduce the issue

Dragg the small div --> all is fine,

Click on swich pip order

--> click and hod on the "new" small div, like if you were planing to drag it, but don't drag it==> you'll see a transform is applied, the small div jumps some pixels toward the right and the bottom ;

 

Note that this jumps only occurs when dragging after the animation; once you have dragged the element once it won't jump anymore until you run the animation

 

If you remove the bounds line 45, the element do not jump anyore... ?!

 

thank's for your attention

 

See the Pen MWyqrML?editors=1010 by jbonlinea (@jbonlinea) on CodePen

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.
×
×
  • Create New...