iPad safari HTML5 App Scrolling Question

58 views
Skip to first unread message

jose de jesus

unread,
Aug 16, 2013, 11:34:25 AM8/16/13
to haxe...@googlegroups.com
Hi to all!, noob here.

I'm learning by making a small html5 app with haxe/html , and while it runs beatifully in explorers in PCs, and even playstation vita's browser :D, in ipad with safari there is this bounce animation when i drag with my finger vertically, and since my game uses drag motions the game is unplayable, or registers the vertical drags after the bounce ends. I presume the same thing must happen while browsing the app from safari in a mac.

It's there a way to deactivate the bounce animation of the vertical scroll?, any workaround or "trick" ?

Thanks for your help.

Cauê Waneck

unread,
Aug 16, 2013, 11:46:13 AM8/16/13
to haxe...@googlegroups.com
Are you running this on Safari itself or through PhoneGap?
You can use a code like at http://stackoverflow.com/questions/16048155/how-to-stop-elastic-scrolling-aka-scroll-bounce-aka-page-overscroll-effect-on to prevent the screen from bouncing. It will however completely disable scrolling, so if you're targetting PhoneGap you may want to actually set UIWebViewBounce itself.
By the way, I recommend you to not use PhoneGap, specially on iOs, as Apple disables JIT compiling for JavaScript for these kinds of webapps, and the outcome may be too slow.

Cheers!
Cauê


2013/8/16 jose de jesus <josejoe...@gmail.com>

--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.

For more options, visit https://groups.google.com/groups/opt_out.

jose de jesus

unread,
Aug 16, 2013, 11:50:40 AM8/16/13
to haxe...@googlegroups.com
Hey!, thanks.

Safari itself, i'm really not familair at all with PhoneGap and will take your adivce of not using it :)

Maybe there's not work around and i should rethink my game not to use drag gestures ?

or does exists any "non PhoneGap " workaround or strategy to adress this?




You received this message because you are subscribed to a topic in the Google Groups "Haxe" group.

jose de jesus

unread,
Aug 16, 2013, 11:51:50 AM8/16/13
to haxe...@googlegroups.com
Hey!, thanks Cauê Waneck .

Safari itself, i'm really not familair at all with PhoneGap and will take your adivce of not using it :)

Maybe there's not work around and i should rethink my game not to use drag gestures ?

or does exists any "non PhoneGap " workaround or strategy to adress this?

Cauê Waneck

unread,
Aug 16, 2013, 12:22:18 PM8/16/13
to haxe...@googlegroups.com
Hi!

2013/8/16 jose de jesus <josejoe...@gmail.com>
Hey!, thanks.

Safari itself, i'm really not familair at all with PhoneGap and will take your adivce of not using it :)

PhoneGap itself isn't bad. But for games using NME, I recommend using the actual native target instead of PhoneGap, as performance would be very superior. Running through Safari uses JIT and is much faster in this sense though. 

Maybe there's not work around and i should rethink my game not to use drag gestures ?

or does exists any "non PhoneGap " workaround or strategy to adress this?

Didn't the code in the link I sent you work? On haxe it would look something like:
js.Browser.document.addEventListener("touchmove", function(e) e.preventDefault(), false);

(untested)

Cheers!
Cauê

jose de jesus

unread,
Aug 16, 2013, 12:40:24 PM8/16/13
to haxe...@googlegroups.com
Hi,

Sorry, didn't had the chance to test your suggestion yet, I will try it as soon as i can.

Thank you very much for the help and orientation.


El viernes, 16 de agosto de 2013 11:34:25 UTC-4, jose de jesus escribió:
Reply all
Reply to author
Forward
0 new messages