<html>
<head>
<base href="https://bugs.webkit.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - window.innerWidth/innerHeight are bogus after both resize AND orientationchange events"
href="https://bugs.webkit.org/show_bug.cgi?id=170595#c5">Comment # 5</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - window.innerWidth/innerHeight are bogus after both resize AND orientationchange events"
href="https://bugs.webkit.org/show_bug.cgi?id=170595">bug 170595</a>
from <span class="vcard"><a class="email" href="mailto:ae@instinctive.de" title="ae@instinctive.de">ae</a>
</span></b>
<pre>If anyone is interested and/or trying to find a workaround for their situation: Both events are completely useless right now, as they never get called with the correct values for innerWidth/Height in place.
The quick fix I immediately deployed in my production apps was to just introduce a timeout in the orientationchange handler (0.7s), as I hoped that after 0.7 seconds, the values are finally correct (seems to be the case).
The "real" fix was to constantly check both innerWidth and innerHeight (say, 10 times per second) and if any of them changes, generate a "fake" resize event. That works, but is of course a waste of CPU and battery.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>