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
Resize: innerWidth/innerHeight bug with iOS9 #25
Comments
I did a bit more tests and added details here: It only occurs with certain meta tags. And it will probably only happen on this version of iOS, I'm sure they will fix it soon. Further, it doesn't happen consistently; only every few refreshes. It's a really brutal bug. For my demos I have been fixing it by replacing my typical This demo is using documentElement for canvas sizing, no problems. This is using Sometimes it will look like one or the other: |
Frustrating bug. The meta tag "shrink-to-fit=0" should fix it. |
Thanks @jonastreub - any other side effects to that tag? Found some more discussion here: |
Not that I am aware of. |
@baptistebriel one thing you could do for the time being is to pass in After this no event listeners are added for resize however you can manually call I do agree with @mattdesl this is a Safari bug and they will fix it in the next version. (I hope) |
Yep, really frustrating bug... So I think the best way is just to use Also, see this - how it could be intentional if it doesn't happen consistently? Really looks like a bug. @jonastreub - Thanks. I will try to add Thanks @mikkoh 👍 |
Turns out it's not intentional (that's what I thought, too) but the viewport bug is unrelated to the window.innerWidth/Height bug. I submitted a Safari bug report and will post here if anything comes from it. It will probably be a long while before Apple fixes this, and even when they do, a lot of users who haven't updated will still be seeing broken sites. 😢 |
Hello, this is not an issue directly related to
bigwheel
, but like 99% of the web we should have it too; did you heard that iOS9 returns double the value forwindow.innerWidth
&window.innerHeight
?https://twitter.com/mattdesl/status/648588118040412160
Do you think we need to implement a polyfill or something for it?
I was thinking of something like this:
And then;
https://github.com/bigwheel-framework/bigwheel/blob/master/index.js#L264
I know this would be a very ugly way to do it, but I don't really have any other ideas.
I was thinking of maybe rewriting the
window.innerWidth
outside ofbigwheel
and then returndocument.documentElement.client[...]
if it's iOS9, but sincewindow.innerWidth
is not a function, I guess we'd have to create one likegetWindowSize
...Maybe it would be more appropriate to create a single module for it? I don't know.
Also, @mattdesl if you came up with a workaround, I'd be glad to hear your thoughts on this!
Have a nice week-end guys, and thanks Apple 😀
The text was updated successfully, but these errors were encountered: