Hi,
I have a problem with page zoom on mobile when interacting with form elements. The page is here:
http://www.juaba.com/contact-us/
I figured it could be due to the viewport tag being:
…as oppose to:
Although i’m not sure how I could fix that?
The page zooming then leads to the user being able to horizontal scroll, which is not great!
Any ideas?
Current meta:
meta name=”viewport” content=”width=device-width, initial-scale=1″
…should it be?
meta name=”viewport” content=”width=device-width, initial-scale=1, maximum-scale=1″
Hi Darren
Thanks for the wait.
The current viewport setup is relatively standard for responsive sites and give the user the freedom to zoom as required.
Have you perhaps been testing on iOS Safari? Let’s perhaps try the following added to Appearance > Custom CSS:
Ref: http://stackoverflow.com/questions/2989263/disable-auto-zoom-in-input-text-tag-safari-on-iphone
Let me know how that goes.
…tried this but no luck:
Forgot to say that yes this is happens on both Mobile Chrome & Mobile Safari on iOS.
Can’t help but feel that if we set the maximum scale to 1 in the viewport tag that it might correct it.
Just not sure how to amend that at all?
Are you able to try this your end – have you experienced this horizontal scroll previously? Could it be to do with the meta slider at all?
It looks to be an iOS Safari specific behavior. Something that Safari adds to sites. Can you please check if the same thing happens if you switch to a default theme like Twenty Fifteen.
I’m not seeing the problem in iOS Chrome. Not that I can see anyway. Here is a child theme to change the viewport tag:
https://siteorigin.com/wp-content/uploads/2015/07/origami-child-no-scale.zip
Download ZIP to desktop.
Install from Appearance > Themes > Add New: Upload ZIP.
Activate.
Check. If correct then:
Redo Appearance > Customize and Appearance > Menu Settings. They reset when a child theme is activated.
If you want to see the change go to Appearance > Editor > functions. We’ve de-registered the old action and added our own new edited action for the viewport.
Hope that helps.
This seems to have fixed the problem, just a matter of me copying the styles across now!
Although it seems I now don’t have the custom CSS option? Is this a Vantage theme fix?
Is there any way to apply this similar patch to the Vantage setup that I currently have, rather than having to restyle it all?
Wow. Definitely working too late with too many threads open. So sorry for the delay. I’ll re-build this child theme for Vantage now.
(You shouldn’t have to copy any CSS rules when activating a child theme).
Right, let’s try this again.
https://siteorigin.com/wp-content/uploads/2015/07/vantage-child-no-scale.zip
Switch back to Vantage.
Hover over Origami Child. Delete.
Install this ZIP from Appearance > Themes > Add New: Upload Theme.
Apologies again for the mistake.
Hi,
Sorry Andrew, i’ve implemented this change. Gone back and amended any CSS that had been styled via the customise menu (as oppose to custom CSS) to get me back to where I was, tested it on Chrome & Safari on iOS mobile – iPhone 6 and the issue is still there?
Can you help?
Thanks,
Darren
Would you mind temporarily switching over to Twenty Fifteen or any other default theme and re-testing. I want to see if the zoom is happening with another stylesheet in use. Thanks.
Sure – done
The child theme looks to be functioning as expected. I’d suggest sticking with it. If ever need to make a custom edit in the future you won’t need to redo all the Customize settings agian.
Could you check too please. I don’t have the issue in iOS (iPhone) Chrome but didn’t before either.
Checking iOS Safari now.
When I check the site now in Vantage in iOS Safari there isn’t any more zooming when I click a form field. The screen shifts down to the field and the background and border color changes to white.
:(
I’m still getting it.
Once you focus onto the field the page become horizontally scrollable? The field size increases too…
Which operating system and browser are you testing in. Thanks.
iPhone 6
iOS 8.3 (12F70)
Chrome version 43.0.2357.61
Safari version (packaged with the above iOS version)
Screen grabs:
https://dl.dropboxusercontent.com/u/13973547/1.png – shows the form field before focus
https://dl.dropboxusercontent.com/u/13973547/2.png – shows the form field when zoomed upon focus
https://dl.dropboxusercontent.com/u/13973547/3.png – shows the horizontal scroll available upon field focus
Awesome, thanks for clearing that up.
The problem is originating from your Custom CSS. If you developed the Custom CSS section please could you take a look at the focus pseudo classes in use. Something in this area here:
Hi Andrew,
I tried removing these styles (along with numerous other styles affecting this element) to no avail…
:(
Quick test for us: Remove everything in Custom CSS just temporarily. Test on mobile. Let me know the result. Thanks.
All custom CSS removed, issue still prevails…
I’ll leave the CSS off so that you can see it.
I see it. I’m almost certain this is a core iOS feature. It can be tough rolling back these kinds of core user interface features. If you have a moment please also hit Google for us and see what you come up with. I’ve been looking but am open to suggestions.
Google’s search bar stays the same width, but the page still has the ability to drag (i.e. horizontal scroll).
Where as if you go to the BBC’s website on mobile (thus m.bbc.co.uk) and hit their search bar, the page doesn’t zoom, no horizontal scroll, nothing…
It’s something that i’ve managed to prevent previously when building sites from scratch, but this is the first time i’ve ‘customised’ a WP theme and the ‘problem’ is seemingly difficult to resolve!
Apologies for the hassle. I’m removing the original action in our child theme meta viewport before it’s been hooked. The result is our new viewport is being placed before the original, therefore not working.
After the opening PHP tag let’s replace the entire contents of functions.php (child theme) with the following:
Hoping this works :)
Did someone say, HIGH FIVE!
Yes, nailed it!
Going forward will this be included as an option on future updates to the main Vantage theme – or will my client have to stick with the child theme from now on?
Awesome! Win!
Sorry I didn’t catch the child theme mistake earlier.
I’ll need to chat to Greg about the current viewport and what he’d like to do with that. There might be a reason he stuck with the one you had before.
I’d recommend sticking with the child theme because if you ever need to introduce a theme file code edit in the future you’ll have the child theme ready and won’t have to redo any Customize options.
Thanks for your patience on this!
Cheers for now.