WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
257375
elem.getBoundingClientRect does not include visualViewport.offsetLeft
https://bugs.webkit.org/show_bug.cgi?id=257375
Summary
elem.getBoundingClientRect does not include visualViewport.offsetLeft
Holger Jeromin
Reported
2023-05-26 05:25:47 PDT
Created
attachment 466505
[details]
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.
Attachments
minimal repro of the issue
(2.53 KB, text/plain)
2023-05-26 05:25 PDT
,
Holger Jeromin
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2023-06-02 05:26:16 PDT
<
rdar://problem/110164602
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug