heart.css icon indicating copy to clipboard operation
heart.css copied to clipboard

Landscape orientation not working very well

Open DjebbZ opened this issue 11 years ago • 3 comments

Hi Freddy :)

I tested the iOS and Android examples and when rotating my device (iPhone 5c iOS 7.1.1) a weird behavior happens : I get an empty zone at the bottom of the screen. Screenshot : image

DjebbZ avatar Jun 27 '14 09:06 DjebbZ

Ok I can reproduce. It appear on Safari but not as an installed webapp on homescreen. It's also not appear if the app is loaded when the device is already on landscape.

If you scroll on the empty zone you can see the viewport scroll. I don't know why Safari adding height on device rotation to landscape…

I don't think it can be fix with only CSS. Maybe a scrollTo can fixe this.

I'll try :

window.addEventListener("orientationchange", function(){
  window.scrollTo(0,0);
}, true);

Freddy03h avatar Jun 28 '14 09:06 Freddy03h

Mhh.. Ok. Was just reporting, but it's good to know nevertheless. Feel free to close the issue.

DjebbZ avatar Jun 28 '14 14:06 DjebbZ

http://stackoverflow.com/questions/22607561/is-there-a-bug-in-the-new-ios-7-1-minimal-ui-viewport-setting http://stackoverflow.com/questions/22391157/gray-area-visible-when-switching-from-portrait-to-landscape-using-ios-7-1-minima

I never noticed this iOS bug so thank's for the report ! My previous code work, I'll add it to the examples.

Freddy03h avatar Jun 28 '14 15:06 Freddy03h