apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.16k stars 988 forks source link

WKWebView displays content wrong after orientation change #951

Open regv opened 4 years ago

regv commented 4 years ago

Bug Report

WKWebView displays content html css wrong after orientation change

Problem

I'm using cordova ios@6.1 for WKWebView to display a page css js. When the app starts up, it shows the view correctly, no matter what orientation it is currently in. However, once I change the orientation the view will either look zoomed in or has whitespace below the the page and position wrong and size. am using IPAD

What is expected to happen?

when oriantation change , i get the view correctly like i getted in ios@5.1.0 and in browser

What does actually happen?

displays content wrong after orientation change

Information

cordova-ios@6.1.0

Environment, Platform, Device

IPAD macbook pro xcode

ihebChaaraoui commented 4 years ago

i have the same issue with my app

codecat commented 4 years ago

I have the exact opposite on the latest nightly build. On first run (left) and after rotating to landscape and then back to portrait (right):

afbeelding afbeelding

Could potentially be an Onsen UI problem too, but this only started happening when I upgraded from 5.1.1 to the latest nightly build.

Edit: This also happens on 6.1.0.

hoangphat258 commented 2 years ago

I have the same issue. It works properly for the first time. Then it always return 'portrait'. Does anyone know how to fix?