furf / jquery-ui-touch-punch

A duck punch for adding touch events to jQuery UI
http://touchpunch.furf.com/
3.51k stars 1.33k forks source link

Sometimes scrolls page instead, sometimes breaks page scrolling #66

Open odedstr opened 11 years ago

odedstr commented 11 years ago

I'm using Touch-Punch on this page:

http://tnuvacruelty.co.il/live-transport/

( on navigator to the right of the image gallery ).

There are 2 problems: 1) It usually does not drag the navigator, and the page scrolls instead. But sometimes it does drag the navigator just fine. 2) Sometimes it gets stuck dragging the navigator, so that wherever you touch it will always drag the navigator and not the page, until you close the page completely and open it again.

The demo on this page: http://touchpunch.furf.com/ always worked fine.

I'm testing with Ipod Touch ISO 5.1.1, Touch Punch 0.1.0, JQueryUI 1.9.2, JQuery 1.8.3

Many thanks,

Oded.

odedstr commented 11 years ago

OK I narrowed it down a bit: If I swipe on the left side of the navigator, then it drags fine, but if I swipe on the middle or on the right side of the navigator, then the page scrolls instead.

ghost commented 11 years ago

I don't see any mobile directives in your meta tags. you have to let them know what your intent is. Try putting the following meta tag in to let mobile devices know you want items to scroll, not the page:

meta name="viewport" content="width=device-width, user-scalable=no"

(Left < /> off so it would not be hidden here)

Also, if you plan on being accessible to mobile device, a top level element, such as the body or a main content view wrapper should have some defined width.

zackd commented 11 years ago

backticks :) <meta name="viewport" content="width=device-width, user-scalable=no" />