Closed d-simon closed 9 years ago
Good catch, thanks a lot!
We'd prefer to combine this with the existing custom resize event, though (see comments). Would you like to update your commit (preferably squashing the result into a single commit) or do you want me to do it?
Indeed, much simpler. :+1: I have squashed the commits.
Awesome! I will give this a quick look in our device lab and merge it after successful testing.
Hm, I can't reproduce this on iOS (7.0.4, 7.1.2, 8.1, 8.3) when testing http://unic.github.io/estatico/demo/modules/slideshow/slideshow.html
https://github.com/unic/estatico/blob/develop/source/demo/modules/slideshow/slideshow.js#L104 is triggered on rotate.
Hm, me neither, anymore… I did some reading and it seems this change actually introduces a bug on android where the resizing hasn't happened yet, but the orientation-change is triggered before that. (Which can conflict with readings from window.innerWidth etc.) Sorry about that. Can be closed in that case.
On mobile devices (in this case iPhone6 – iOS 8.1.3) the
resize
event was not triggered by an orientation change, therefore thecurrentBreakpoint
was not updated. This PR proposes to trigger themq
event onorientationchange
.