[Webkit-unassigned] [Bug 207089] New: Fixed elements should stay fixed with pinch-to-zoom
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Feb 1 01:38:12 PST 2020
https://bugs.webkit.org/show_bug.cgi?id=207089
Bug ID: 207089
Summary: Fixed elements should stay fixed with pinch-to-zoom
Product: WebKit
Version: Safari 13
Hardware: Macintosh
OS: macOS 10.15
Status: NEW
Severity: Normal
Priority: P2
Component: Scrolling
Assignee: webkit-unassigned at lists.webkit.org
Reporter: cc.glows at gmail.com
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>
--
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/20200201/f4530f18/attachment.htm>
More information about the webkit-unassigned
mailing list