Skip to content
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

Forced check of media query change on orientation change #46

Merged
merged 1 commit into from
Apr 22, 2014

Conversation

k41n
Copy link
Contributor

@k41n k41n commented Apr 17, 2014

Hey, on our project we have been investigating the problem with mobile phones were not able to detect orientation change while it was clearly added to CSS. We came up to solution below which I would like to contribute.

@akoenig
Copy link
Owner

akoenig commented Apr 19, 2014

Hej @k41n,

thanks for your contribution. Could you give me some background information about the affected device range? I thought that this is not an issue at all.

/André

@k41n
Copy link
Contributor Author

k41n commented Apr 21, 2014

André, thanks for response.

The device we tested on was iphone 5s.

Please find attached relevant part of CSS which does not work without monkey-patch I made:

https://gist.github.com/k41n/11142946

If there is way to trigger orientation change columns recreation without messing with forks I will gladly return to upstream, so let me know if I am doing something wrong.

Observed behaviour was following: if I am loading page with landscape orientation, I have 3 columns with entries. They are still 3 when I rotate iPhone. But if I load page holding device in portrait orientation, CSS works and I see 2 columns. With offered patch applied I observe intended behaviour: number of columns changes on device rotation.

@akoenig
Copy link
Owner

akoenig commented Apr 22, 2014

If there is way to trigger orientation change columns recreation without messing with forks I will gladly return to upstream, so let me know if I am doing something wrong.

:) No, everything is fine. I have to thank you for the patch!

I just want to understand if this is a browser-specific issue or if it affects all vendors. I'm just asking because I do not see the problem when using Google Chrome for instance.

Do you use Safari on the respective iPhone?

akoenig pushed a commit that referenced this pull request Apr 22, 2014
Forced check of media query change on orientation change
@akoenig akoenig merged commit 12ecbf8 into akoenig:master Apr 22, 2014
@akoenig
Copy link
Owner

akoenig commented Apr 22, 2014

Merged in v0.4.2.

@k41n
Copy link
Contributor Author

k41n commented Apr 23, 2014

Yes, we used Safari native browser. Problem does not reproduce under Google Chrome.

@akoenig
Copy link
Owner

akoenig commented Apr 23, 2014

Okay, cool. Could you check the new release v0.4.2 and give me feedback if the problem still persists?

@k41n
Copy link
Contributor Author

k41n commented Apr 23, 2014

Just switched back to upstream version and updated to 0.4.2. Everything works as expected, thank you!

@akoenig
Copy link
Owner

akoenig commented Apr 23, 2014

Perfect! Thanks again for your contribution and the upstream check. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants