Is there any way to disable zoom on an iPad

Posted on
Fri Jul 20, 2018 5:18 am
Umtauscher offline
User avatar
Posts: 566
Joined: Oct 03, 2014
Location: Cologne, Germany

Is there any way to disable zoom on an iPad

Well first of all, I am a noob when it comes to webdesign.
So forgive me if there are any stupid things in that question.

What I am trying to do is to implement a security keypad on the controlpage. I am using the EPS Control Page Keypad plugin.
I have designed a keypad and connected it to the plugin. Everything works but the performance of the keypas really sucks....

What is most problematic is that the iPad / iPhone zooms instead of entering 2 identical digits if you are not doing it in super slow motion.
So I am trying to disable the zoom function.
Searching the web I found this meta tag.
Code: Select all
<meta name="viewport" content="width=device-width,user-scalable=no" />

So I wanted to try it out but how can I embed that tag into my keypad control page?
Any ideas?
Thanks
Wilhelm

Posted on
Fri Jul 20, 2018 9:18 am
jay (support) offline
Site Admin
User avatar
Posts: 18212
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Is there any way to disable zoom on an iPad

It can't be done per page, but you might be able to hack it into the HTML template for all control pages (though you'd have to experiment yourself, no idea if it'll work). The templates are located here:

Code: Select all
/Library/Application Support/Perceptive Automation/Indigo 7/IndigoWebServer/templates


and I think the one you'll want to edit is controlpage.html (though I could also be wrong there). Note that anything you change in that directory will be overwritten the next time you install an update.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Fri Jul 20, 2018 9:21 am
Umtauscher offline
User avatar
Posts: 566
Joined: Oct 03, 2014
Location: Cologne, Germany

Re: Is there any way to disable zoom on an iPad

Thanks, I wil experiment with that.

Posted on
Fri Jul 20, 2018 9:48 am
matt (support) offline
Site Admin
User avatar
Posts: 21416
Joined: Jan 27, 2003
Location: Texas

Re: Is there any way to disable zoom on an iPad

Note too, that only will work if you are viewing the Control Page from a browser (Safari). If you are using Indigo Touch then none of the HTML templates are used.

Image

Posted on
Fri Jul 20, 2018 9:53 am
Umtauscher offline
User avatar
Posts: 566
Joined: Oct 03, 2014
Location: Cologne, Germany

Re: Is there any way to disable zoom on an iPad

Thanks matt,

that was my intention.
Indigo Touch doesn't zoom anyway.

The meta tag doesn't seem to work though. Is there any special palce I should put it?
I placed it in the header like this, but it it seems to be ignored.
Code: Select all
<title>Indigo Home Control Server : Security Keypad</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />

Posted on
Fri Jul 20, 2018 10:04 am
matt (support) offline
Site Admin
User avatar
Posts: 21416
Joined: Jan 27, 2003
Location: Texas

Re: Is there any way to disable zoom on an iPad

Don't add it to the top. Edit line 12. Or maybe line 20. (just do both)

Note also you have to stop and restart the server because the templates are cached at runtime.

Image

Posted on
Fri Jul 20, 2018 10:18 am
Umtauscher offline
User avatar
Posts: 566
Joined: Oct 03, 2014
Location: Cologne, Germany

Re: Is there any way to disable zoom on an iPad

It simply doesn't work.
I can see that the meta tag is delivered in the source code, but it simply doesn't stop safari from zooming.

Posted on
Fri Jul 20, 2018 10:25 am
Umtauscher offline
User avatar
Posts: 566
Joined: Oct 03, 2014
Location: Cologne, Germany

Re: Is there any way to disable zoom on an iPad

I give up for now,
It seems from iOS 10 on Safari ignore the meta tag.
Apple simply know what's best for the user....

Posted on
Sat Jul 21, 2018 6:41 am
Umtauscher offline
User avatar
Posts: 566
Joined: Oct 03, 2014
Location: Cologne, Germany

Re: Is there any way to disable zoom on an iPad

Seems I cannot let it go... ;-)

I found this :

I've been able to fix this using the touch-action css property on individual elements. Try setting touch-action: manipulation; on elements that are commonly clicked on, like links or buttons.

Can anyone tell me if this is usable?

As I stated earlier the Indigo Touch app doesn't have the zooming problem on buttons, so I suppose something differs there.

Posted on
Sat Jul 21, 2018 7:27 am
FlyingDiver offline
User avatar
Posts: 7211
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Is there any way to disable zoom on an iPad

Umtauscher wrote:
As I stated earlier the Indigo Touch app doesn't have the zooming problem on buttons, so I suppose something differs there.


Indigo Touch doesn't use a web view and it's not rendering HTML. It's completely different.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun Aug 26, 2018 9:15 am
Umtauscher offline
User avatar
Posts: 566
Joined: Oct 03, 2014
Location: Cologne, Germany

Re: Is there any way to disable zoom on an iPad

Just for anyone who is interested, I put this line in the iPhone section of the control template.
Code: Select all
<meta name="viewport" content="width=device-width, initial-scale=0.5, maximum-scale=0.5, user-scalable=no">

This works on the iPhone when using mobile Safari.

This is a global setting and restricts zoom on all control pages.

I would really have an option to set such a meta tag on individual pages.
Cheers
Wilhelm

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests