-
Notifications
You must be signed in to change notification settings - Fork 12.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Meta Viewport tag currently in use is broken on iOS #1398
Conversation
Using only `width=device-width` causes iOS to fix the width and not update on orientation change. Including `initial-scale=1.0` solves this issue. Take a look at the [viewport test](http://snugug.github.io/viewport-test/) I've made.
@@ -16,7 +16,7 @@ | |||
<meta name="description" content=""> | |||
|
|||
<!-- Mobile viewport optimized: h5bp.com/viewport --> | |||
<meta name="viewport" content="width=device-width"> | |||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
Related #1099 (comment) |
Fixed by ff37dba. Thanks |
Awesome, thanks! |
I searched through the issues and found this one before opening a new one regarding I propose to change the meta tag to not include
As advised on Quirksmode by @pp-koch:
Is this a wanted change? |
@jelmerdemaat we should discuss this. Can you open a new issue and maybe even provide some test pages ? Thanks! |
I can certainly open a new issue, later today. I have no experience with making test pages but I will certainly try and provide my examples with the issue! |
Great, thanks! |
(Randomly) in looking at this issue I discovered that @pp-koch (who I'm sure has a test page or two) is on Github and has a total of 2 followers. |
I thought this bug was patched in iOS6, which is why this was reintroduced in both this and the mobile BP project |
I have not made a new issue yet because I have not yet been able to reproduce the problem. @Snugug already made a demo page which indeed seems buggy for me, but at the moment I am only able to test with iOS 5.1.1. Can anyone confirm the behavior described in the Quirksmode post for iOS6 and/or iOS7 using the provided demo? |
And when you rotate the device to landscape? As I understand the problem would occur when the orientation changes, the layout would stick to 320px wide. |
@jelmerdemaat, from the test you mentioned: [Device]: [reported width as portrait, color] => [reported width as landscape, color] => [reported width as portrait, color] No Viewport Tag: 980px, green => 980px, green => 980px, green Device Width Only zooms, misrepresents the width, and rather humorously misrepresents the width on return to portrait. |
from: http://www.quirksmode.org/blog/archives/2013/10/more_about_scal.html
|
Classic trolling by @ppk :) |
Oh... well... hooray! :) Thanks guys 👍 |
…value for initial-scale. Ref h5bp/html5-boilerplate#1398
…value for initial-scale. Ref h5bp/html5-boilerplate#1398
Using only
width=device-width
causes iOS to fix the width and not update on orientation change. Includinginitial-scale=1.0
solves this issue. Take a look at the viewport test I've made.