[Webkit-unassigned] [Bug 254861] iPadOS: Viewport doesn't correctly restore after dismissing software keyboard for installed web apps
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Apr 20 01:06:15 PDT 2023
https://bugs.webkit.org/show_bug.cgi?id=254861
--- Comment #4 from ik at rejh.nl ---
Just wanted to add to philipp's comment (#3):
One important thing to note here is that the rAF() is needed because the viewport resize event can fire before the visualViewport.height reflects the new height. I can't test right now, but I remember that the behavior was different between regular Safari and installed web apps; one of them seemed to always work as expected without rAF(), the other needed it.
So instead of this:
```
visualViewport.addEventListener('resize', () => {
console.log( visualViewport.height );
});
```
You need this:
```
visualViewport.addEventListener('resize', () => {
requestAnimationFrame( () => {
console.log( visualViewport.height );
});
});
```
I'll try to find some time to file a separate bug for this but if someone beats me to it: please do :))
--
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/20230420/99598bdb/attachment-0001.htm>
More information about the webkit-unassigned
mailing list