Telerik-Verified-Plugins / WKWebView

DEPRECATED - this plugin served a purpose in the past, but there are better implementation now
832 stars 149 forks source link

Bad resize on rotate with ScreenOrientation for WKWebView #176

Open eloisance opened 9 years ago

eloisance commented 9 years ago

I add WKWebView and ScreenOrientation for WKWebView to my ionic project, but when I rotate my app landscape to portrait the width is incorrect (1/4 of real size).

clauderic commented 9 years ago

I had a similar issue. Usually it's caused by an element overflowing. Try adding overflow: hidden; on either the html or body element for starters to see if it fixes it (assuming your layout allows for that). Then you can try to narrow your search.

ElodieC commented 9 years ago

I have the same issue. The overflow: hidden is not working unfortunately.

clauderic commented 9 years ago

What meta viewport tags are you using?

ElodieC commented 9 years ago

Since I use Ionic, the viewport meta tag is <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">. I've also tried with the width=device-width inside. Still no result.

clauderic commented 9 years ago

Can you take a screenshot of the issue? In theory hiding overflow on body should solve it, assuming it's set to height: 100%;. Not sure how your DOM is set up though. Your viewport tags look okay.

Regardless though, I do agree that this appears to be a bug with WKWebView. Which version of iOS are you seeing this issue on? For me it only started happening on iOS 9

ElodieC commented 9 years ago

I won't show you all the app because of confidentiality but here you can see what is happening. I see this issue on iOS 8.0 and 9.

screenshot

clauderic commented 9 years ago

That seems like a different issue than the one I ran into. Mine was a scaled down version of the app, like it was zoomed out to a quarter size. Funny enough the app was still usable in that tiny rectangle

Djagu commented 8 years ago

@ElodieC Have you found any solution for this issue ? Because I am having exactly the same one.

Djagu commented 8 years ago

@manu1895 Have you found any fix for this issue ?