-
Notifications
You must be signed in to change notification settings - Fork 7
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
Width and height incorrect on IOS when orientation changes. #52
Comments
@robert-j-webb In your fix, what meta viewport content are you using? |
Reference info: https://stackoverflow.com/questions/1649086/detect-rotation-of-android-phone-in-the-browser-with-javascript/6603537#6603537 The SO above leaves me questioning the reliability of |
@rwwagner90 @runspired @robert-j-webb any thoughts on this? I vaguely remember @runspired saying that matchMedia was too aggressive, but wondering if we can leverage its implementation to fix the issue without being as aggressive...? |
@GCheung55 I don't know much about this, off the top of my head. I'm open to proposed solutions. |
I propose to remove the addition of |
@GCheung55 I am totally open to whatever solution works for you. Would you mind opening a PR? |
I believe #24 introduced a bug. I'm testing against Simulated iPhone X.
Below are
widths
andheights
returned from_currentWidth
and_currentHeight
methods, respectively.Portrait:
widths
: [375, 375, 375]heights
: [635, 635, 812]Landscape:
widths
: [724, 724, 375]heights
: [375, 325, 812]Going by the logic in
_currentWidth
and_currentHeight
, the smallest value will always be used returned regardless of orientation. E.g.width
will always be 375 andheight
will always be 325.My meta viewport content looks like:
The text was updated successfully, but these errors were encountered: