Jump to content
Search Community

Draggable fails in Win 8 touch with type='x'

garyw test
Moderator Tag

Go to solution Solved by garyw,

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

Interesting - it worked fine on the Surface 3 Pro, but I occasionally saw what you were talking about on the regular Surface 2. We're about to release an update to Draggable (and all of GSAP), so I dropped that into your pen and it seems to have fixed the issue. Please verify - you can get the preview of the next release at https://s3-us-west-2.amazonaws.com/s.cdpn.io/16327/Draggable-latest-beta.js (uncompressed)

Link to comment
Share on other sites

Interesting - it worked fine on the Surface 3 Pro, but I occasionally saw what you were talking about on the regular Surface 2. We're about to release an update to Draggable (and all of GSAP), so I dropped that into your pen and it seems to have fixed the issue. Please verify - you can get the preview of the next release at https://s3-us-west-2.amazonaws.com/s.cdpn.io/16327/Draggable-latest-beta.js (uncompressed)

 

This didn't work, either.

Link to comment
Share on other sites

Okay, it seems to be working now in CodePen. It seemed to fail when part of the draggable box was below the bottom of the scrollable viewport.

 

However, it still doesn't work in my own app (which has a lot of complex code).  I am getting calls to onDrag as I drag, but within the onDrag callback, "this.x" is always 0.

Link to comment
Share on other sites

This seems like it may be device-specific which is very odd indeed. 

 

Just curious: does it solve anything if you set allowNativeTouchScrolling:false in your Draggable's vars object? Like:

Draggable.create(".box", {
    bounds:"#demo",
    type:"x",
    allowNativeTouchScrolling:false
});

Did you try the beta version of Draggable in your app (and make sure you cleared your cache)? No dice?

  • Like 1
Link to comment
Share on other sites

  • Solution

Setting allowNativeTouchScrolling to false with the new beta code did the trick!

 

I would like to reiterate again that the only time I had trouble was when type='x'. Any other type worked fine.

Link to comment
Share on other sites

Hi garyw :)

 

sorry about that ,

 

Draggable allows you to native touch-scroll in the opposite direction as Draggables that are limited to one axis. For example, a Draggable of type:"x" or "left" would permit native touch-scrolling in the vertical direction, and type:"y" or "top" would permit native horizontal touch-scrolling.

 

you can turn that off with adding this in your draggable creation : allowNativeTouchScrolling:false

Link to comment
Share on other sites

  • 2 weeks later...

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...