Monday, 15 April 2013

javascript - Disabling swipe right to previous page on Windows Phone -



javascript - Disabling swipe right to previous page on Windows Phone -

i'm trying utilize http://wipetouch.codeplex.com/ implement swiping on meteor app shift between templates in iron router.

it works beautifully on ios , android on windows phone, os' native swipe gesture (swiping right in browser moves 1 page in history) interferes user's swiping action.

is there way can disable this?

also other platforms have similar functionality prevent user swiping in web app effectively?

as example, this app uses same library implement swipe gestures.

note: using touch-action: none on body tag not work.

i encountered same problem on little web application : scratch game, player had swipe finger on "scratchable" zone find had won.

the game supposed run on windows 8.1 tablets, ie10 on it.

we set in css snippet :

*{ touch-action: none; }

the result deactivate touch events on app (including swipe backward / forward).

but had reactivate touch event on scratch zone, allow player play :)

for had add together :

#playzone{ touch-action: chained; }

the app still works perfectly, both on ie10 on tablets on windows phone 8.1.

(please forgive english, it's not mother tongue)

edit : after having tested more on ie, seems adding touch-action:none; on html element plenty accomplish op wanted.

javascript jquery meteor touch

No comments:

Post a Comment