[Webkit-unassigned] [Bug 257375] New: elem.getBoundingClientRect does not include visualViewport.offsetLeft
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri May 26 05:25:47 PDT 2023
https://bugs.webkit.org/show_bug.cgi?id=257375
Bug ID: 257375
Summary: elem.getBoundingClientRect does not include
visualViewport.offsetLeft
Product: WebKit
Version: WebKit Nightly Build
Hardware: iPhone / iPad
OS: iOS 16
Status: NEW
Severity: Normal
Priority: P2
Component: Layout and Rendering
Assignee: webkit-unassigned at lists.webkit.org
Reporter: bugzillawebkit at katur.de
CC: bfulgham at webkit.org, simon.fraser at apple.com,
zalan at apple.com
Created attachment 466505
--> https://bugs.webkit.org/attachment.cgi?id=466505&action=review
minimal repro of the issue
When the visual viewport is scaled and moved a getBoundingClientRect does not include visualViewport.offsetLeft.
In my minimal repro (attached and online https://www.katur.de/issues/safari_viewport-scaled_pos-fixed.html ) I check every
second the BoundingClientRect of a base element and put its top,left value to the position of a position:fixed overlay element.
This overlay element should cover the base element exactly.
On desktop and mobile Chrome+Firefox this works even with pinch zoom.
With mobile Safari I get an offset in the size of visualViewport.offsetLeft.
The repo has a second overlay which uses the same BoundingClientRect values but add visualViewport.offsetTop/Left value to the position.
With mobile Chrome+Firefox the "BCR overlay" is always over the base element even with pinch zoom.
With mobile Safari the "BCR+offset* overlay" is always over the base element even with pinch zoom.
--
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/20230526/e886b966/attachment-0001.htm>
More information about the webkit-unassigned
mailing list