First of all, everything works perfectly on UIWebView on all possible versions of iOS, so this is a specific WKWebView problem.
After I completed the implementation of WKWebView, I ran into a massive graphical error / problem. In the portrait, my application works fine, but when I rotate it into the landscape, something strange happens, my headers and footers do not display correctly.
If I look at my web code, I can see that the CSS width is updated in the DOM with the correct data, but I can only see the portrait orientation width (320 pixels) of the header / footer, even if it reads style="width: 568px;"
in the DOM.
I use positioning:fixed
, but if I move on to positioning: relative, it displays as expected when scrolling (unfortunately, relative positioning is not an option in this case). If I click on the header / footer or scroll somewhere on the screen, the header and footer somehow update and display correctly and display as expected (only 1px scroll is required).
I will try to illustrate how it looks.
Red = Visible
Blue = Invisible (even if it is there and events are triggered by clicking / scrolling).

Has anyone experienced this problem before and got a solution?
source share