Jump to content
Search Community

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

garyw

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

Posted

I am using a Windows 8.1 hybrid device and IE 11.  If I create a Draggable with type:'x', it doesn't work.  I created a CodePen to demonstrate this.  I have to touch and drag about 3 times before it works.  It works fine with a mouse.

 

See the Pen KpNbNx by anon (@anon) on CodePen.

Posted

Hi garyw  :)

 

pls check this out , do you still have any problem ?! ( with preview of the next release files ) : 

See the Pen bdBOYM by MAW (@MAW) on CodePen.

Posted

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)

Posted

Hi garyw  :)

 

pls check this out , do you still have any problem ?! ( with preview of the next release files ) : 

See the Pen bdBOYM by MAW (@MAW) on CodePen.

 

This one still fails.

Posted

I am using an HP Envy 15 Touch.

Posted

I am using an HP Envy 15 Touch.

 

Funny, using type='y' doesn't have any problem.

Posted

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.

Posted

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.

Posted

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
  • Solution
Posted

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.

Posted

Why is allowNativeTouchScrolling not documented?

Posted

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

  • 2 weeks later...
Posted

Sorry about that. The docs have been updated (see Draggable config properties)

  • Like 1

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