Page 1 of 2

Ios and Android prevent double/multiple tap on element

Posted: Sun Mar 09, 2014 10:02 am
by Tom6106181

Hi.
I am trying to prevent double/multiple tap causing ZOOM, on my timepicker.
(timepicker has a + and - button, and when user rapidly tap the +/- the screen is zooming).

I am going for an approach like this;
https://gist.github.com/johan/2047491

However, I can not seem to get it working as I want to for both IOS and Android.
Do you have any suggestions on how to rewrite this plugin snippet to disable all zoom/multiple tap events on DIV.SOMEelement ??

Thanks!
-Tom


Ios and Android prevent double/multiple tap on element

Posted: Sun Mar 09, 2014 10:53 am
by Alena Prykhodko

Hello Tom,

We'll look into this and let you know asap.


Ios and Android prevent double/multiple tap on element

Posted: Mon Mar 10, 2014 12:05 am
by Illya Stepanov

Hi Tom,

This question is common for all web not just an appery.io.

But we try to help you.

About this solution: https://gist.github.com/johan/2047491

This is a jQuery plugin. Therefore you have to:
ol
liPaste this JS code into the Appery.io JavaScript asset./li
liCall this plugin on the element you need (when it would be ready). Something like this: codejQuery("selector").nodoubletapzoom();/code/li
/ol
Note 1: selector should select problem element.
Note 2: prevar IS_IOS = /iphone|ipad/i.test(navigator.userAgent);/pre
--this code would work only in iOS. So you have to modify it for work on Android.

Best regards.


Ios and Android prevent double/multiple tap on element

Posted: Mon Mar 10, 2014 6:57 am
by Tom6106181

Hi, I am aware of all of this. My question is how to do this with appery, disabling double/multiple tap on an element (that would work for both android and ios).


Ios and Android prevent double/multiple tap on element

Posted: Mon Mar 10, 2014 6:58 am
by Tom6106181

OR perhaps modify the plugin some to accomplish this?


Ios and Android prevent double/multiple tap on element

Posted: Mon Mar 10, 2014 11:02 pm
by Alena Prykhodko

Hi Tom.

Previous suggestion is exactly what you need to do.

Please read here how to add javascript file http://docs.appery.io/documentation/u...
To call javascript code add Run JS action on Page load event.


Ios and Android prevent double/multiple tap on element

Posted: Tue Mar 11, 2014 4:59 am
by Tom6106181

I have no problem doing this, and do not need you to tell me several times how to create a javascript asset for my app. The problem is, as I am trying to explain in my initial post, that that approach is not working.


Ios and Android prevent double/multiple tap on element

Posted: Tue Mar 11, 2014 5:39 am
by Alena Prykhodko

Dear Tom.

Your Appery.io application is HTML5 application. Thus there is no Appery.io specific problem.
Please show us what you have tried and what doesn't work, we'll try to help with implementation.

Please share you application with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a tell its name and steps to reproduce the problem.


Ios and Android prevent double/multiple tap on element

Posted: Tue Mar 11, 2014 6:13 am
by Tom6106181

As my initial question clearly inform about, I am trying the plugin soulution, but it will not work on device, when rapidly tapping an element. (example in my case, a +/- button to change hour/minute values in timepicker.

In a regular mobile website, using a mouse to click the button, there are no problems, but on a device (iphone and android + simulator for both), the multiple tapping is causing the screen to zoom.

Simply put, I need the touchscreen to NOT zoom at all, no mather how many times user tap, on a selected element (example: div.DoNotZoomWhenTapped)


Ios and Android prevent double/multiple tap on element

Posted: Tue Mar 11, 2014 3:01 pm
by Maryna Brodina

Hello! In source code there is metatag which specifies that app is not scalable. We tested and can't reproduce it. Have you changed anything on Source tab? If you didn't change anything and it's still reproducible for you, please post your public app link.