Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Contributor
Posts: 8
Registered: ‎11-05-2013
My Device: z10
My Carrier: telcel
Accepted Solution

preventing zoom on double tap <meta name="touch-event-mode" content="native"/> not working :/

hi there! i reacently submited a game to blackberry appworld but where rejected because when double tap it zooms and it scrolls (obviously the game shouldnt do this) i added this tag <meta name="touch-event-mode" content="native"/> but it looks it didnt worked, here is the complete head:

 <head>
        <meta charset="utf-8"/>
        <meta name="touch-event-mode" content="native"/>
        <title>Untitled Document</title>
        <script src="local:///chrome/webworks.js" type="text/javascript"></script>
        <script src="main.js"></script>

        <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
    </head>

 

am i doing something worng? do this works in BB10  vmware player?

Retired
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: preventing zoom on double tap <meta name="touch-event-mode" content="native"/> not working :/

The touch-event-mode <meta> tag won't do anything on BlackBerry 10. You can try setting the viewport to not be scalable, and lock the minimum and maximum scales.

<meta name="viewport" initial-scale=1.0, minimum-scale-1.0 maximum-scale=1.0, user-scalable=no />

If you have trouble testing, feel free to email me the BAR file and I can provide feedback.

Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
New Contributor
Posts: 8
Registered: ‎11-05-2013
My Device: z10
My Carrier: telcel

Re: preventing zoom on double tap <meta name="touch-event-mode" content="native"/> not working :/

hi there, thanks for answering, i have probed my app on a z10 with SO 10.1 and works perfectly but not in 10.2, I probed the meta tag you sugested but doesnt work,  maybe im doing a something wrong, i wrote it this way:

 

<meta name="viewport" initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no />

 

is it ok? 

New Contributor
Posts: 8
Registered: ‎11-05-2013
My Device: z10
My Carrier: telcel

Re: preventing zoom on double tap <meta name="touch-event-mode" content="native"/> not working :/

i wrote in this way ando didnt work:

<meta name="viewport" content="initial-scale=1.0; minimum-scale=1.0; maximum-scale=1.0; user-scalable=no;"/>
Retired
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: preventing zoom on double tap <meta name="touch-event-mode" content="native"/> not working :/

Apologies, you are correct it should be:

 

<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />

There are quite a few typos in my previous example. Can you please give this a shot?

 

In some cases, it's recommended to also add width=device-width to the list.


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
New Contributor
Posts: 8
Registered: ‎11-05-2013
My Device: z10
My Carrier: telcel

Re: preventing zoom on double tap <meta name="touch-event-mode" content="native"/> not working :/

this isnt working :/ i have tested my app on a z 10 Imagination GPU whit 10.1 SO and the <meta name="touch-event-mode" content="native"> works perfectly, but when i test it on a z10 qualcomm with 10.2 OS the game moves when slide the screen and zoom on double tap appworld is rejecting my app for this reason, can this be a SO issue or a device (qualcomm) issue?? in the webworks api they say that to solve this problem i have to add the "touch event mode" meta tag and
supposedly it supports BB10 devices, i dont know what to do :/ i send an email to BlackBerryAppWorldRequests@rim.com comenting this but they dont answer me
Retired
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: preventing zoom on double tap <meta name="touch-event-mode" content="native"/> not working :/

Ah, I see the documentation you are referring to:
http://developer.blackberry.com/html5/documentation/touch-event-mode.html

 

Admittedly I was not aware of this until now; previously I had always used the <meta> viewport approach that I mentioned which, in my testing now, is working as I expected...

 

However, if you are using:
<meta name="touch-event-mode" content="native"/>

 

And any of these scenarios are not disabled (as documented):

  • Double tap to zoom into a content block
  • Touch and hold to display the context menu
  • Two finger text selection activation on tap and hover
  • Conversion from touch events into mouse events
  • Automatic target correction
  • Scrolling, including subframe scrolling
  • Pinch-to-zoom behavior

Then that sounds like a proper candidate for a but report:

https://www.blackberry.com/jira/secure/Dashboard.jspa

 

This way the issue will go to our internal development teams who will be able to address it at the root.

 

 

Are you by chance using any other libraries in your application that may be overriding the <meta> elements (either touch-event-mode or viewport)? Have you had the opportunity to connect Web Inspector to your live application and inspect the <head> of the running application to ensure that everything there is intact and no additional elements have been introduced?


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
New Contributor
Posts: 8
Registered: ‎11-05-2013
My Device: z10
My Carrier: telcel

Re: preventing zoom on double tap <meta name="touch-event-mode" content="native"/> not working :/

im not using any library, just webworks, i have connected my app to web inspector but i dont know how to use it Smiley Tongue have you tested the meta viewport in the SO 10.2 and qualcomm device and it worked? i tested it but can't make it work :/ you write the viewport tag exactly like this: <meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" /> ??
Retired
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: preventing zoom on double tap <meta name="touch-event-mode" content="native"/> not working :/

Hi there, could you please give an example of an index.html page that has double-tap to zoom behaviour? I've been trying to reproduce this, but I can't actually get double-tap to zoom to happen in the first place. In my testing double-tap returns to the default viewport scale (i.e. zooms out.) If you can provide an index.html page that behaves in this way, I'll do my best to provide the modifications which disable the behaviour on my end.

Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
New Contributor
Posts: 8
Registered: ‎11-05-2013
My Device: z10
My Carrier: telcel

Re: preventing zoom on double tap <meta name="touch-event-mode" content="native"/> not working :/

can i send you mi .bar file + index file? when i double tap for the first time just in <divs> it zooms in, double tapping again it zooms out, the screen moves when i slide too

may i send the files to eoros@blackberry.com?