WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
207089
Fixed elements should stay fixed with pinch-to-zoom
https://bugs.webkit.org/show_bug.cgi?id=207089
Summary
Fixed elements should stay fixed with pinch-to-zoom
cc.glows
Reported
2020-02-01 01:38:12 PST
When pinch-to-zooming, `fixed` elements don't stay fixed for a period and can be scrolled, but elements positioned relative to it with `fixed` get positioned incorrectly when using `getBoundingClientRect()`. This doesn't occur when zoomed out normally (0:00 - 0:05). When pinch to zooming as well, fixed elements can suddenly disappear after zooming in with pinch-to-zoom. Scroll down to the bottom right of the page in the repro and zoom in. Minimal reproduction: <!DOCTYPE html> <title>Basic Visual Test</title> <style> body { height: 3000px; width: 3000px; } #reference { position: fixed; top: 150px; left: 150px; width: 200px; height: 200px; background-color: red; box-shadow: inset 0 0 0 1px black; } #popper { width: 100px; height: 100px; background-color: rebeccapurple; box-shadow: inset 0 0 0 1px black; } </style> <div id="reference">Reference Box</div> <div id="popper">Popper Box</div> <script> popper.style.position = 'fixed'; function update() { const refRect = reference.getBoundingClientRect(); const popRect = popper.getBoundingClientRect(); popper.style.left = `${refRect.right}px`; popper.style.top = `${refRect.top + popRect.height / 2}px`; } window.addEventListener('scroll', update); update(); </script>
Attachments
Video demonstration of the reproduction
(2.14 MB, video/quicktime)
2020-02-01 01:48 PST
,
cc.glows
no flags
Details
Test HTML
(858 bytes, text/html)
2020-02-03 10:39 PST
,
Simon Fraser (smfr)
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
cc.glows
Comment 1
2020-02-01 01:48:10 PST
Created
attachment 389456
[details]
Video demonstration of the reproduction Attached a video that was missing in the original post. Apologies for the redundant wording in it — I can't edit it.
Radar WebKit Bug Importer
Comment 2
2020-02-02 13:13:49 PST
<
rdar://problem/59097233
>
Simon Fraser (smfr)
Comment 3
2020-02-03 10:39:03 PST
Created
attachment 389537
[details]
Test HTML
Alex
Comment 4
2025-11-28 06:22:20 PST
Even getBoundingClientRect() does not work reliably on iOS in 2k25, bug is assigned to Nobody, status NEW. Reported 5 years ago, likely never even worked, likely never will. 4 trillion dollar company, everybody. You should be ashamed.
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