[Webkit-unassigned] [Bug 170595] window.innerWidth/innerHeight are bogus after resize/orientationchange in WKWebView (but not MobileSafari)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Apr 22 08:27:17 PDT 2017


--- Comment #9 from ae at instinctive.de ---
(In reply to Tim Horton from comment #6)
> Hello! Can you, by any chance, attach a test app that reproduces the
> regression? I can reproduce the problem, but I can *also* reliably reproduce
> it in earlier versions of iOS, so I'm not sure I'm testing the same thing as
> you.

Hello. I'm not completely sure really what changed and when, all I know is that the app's orientation change handling was broken the moment I updated to iOS 10.3.1. 

Here's some debug output from the handlers (window.orientation in parentheses) :

--- After rotating the phone from portrait to landscape: ---

RESIZE: 320 x 320 (90)
App.resize (from update): 568 x 320

- wrong (old portrait) dimensions in orientationchange handler
- wrong dimensions in resize handler (square!)
- App.resize is the "fake" handler I wrote which manually detects size changes (fine)

--- After rotating back to portrait: ---

RESIZE: 320 x 320 (0)
App.resize (from update): 320 x 568

- wrong (old landscape) dimensions in orientationchange handler
- wrong dimensions again in resize handler

Note that there's NEVER a correct 'resize' event generated with the correct values for innerWidth/innerHeight!

Hope this helps. Probably a difficult one to get fixed.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170422/a43d1ec8/attachment-0001.html>

More information about the webkit-unassigned mailing list