Bug 234427

Summary: scrollBy(0, 0) causes scrolling when zoomed in
Product: WebKit Reporter: Rio <mqwdtz>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: simon.fraser, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Safari 15   
Hardware: Mac (Apple Silicon)   
OS: macOS 12   

Description Rio 2021-12-16 23:19:30 PST
When zoomed in (e.g. via the trackpad) in any web page, the `window.scrollBy` function tends to scroll up and left further than expected. This is dependent on the zoom level and exact position of the viewport.

On any web page, zoom in and call `window.scrollBy(0, 0)`. Most of the time, this causes a one pixel scroll left and up (as measured by `window.scrollX` and `window.scrollY`). In some cases, it acts as expected and does not scroll at all or scrolls by an amount small enough that the `window.scrollX` value does not change.

Tested on:

- Safari 14.1.2 (WebKit 16611.3.10.1.6)
- Safari 15.2 (WebKit 17612.3.6.1.6)
- Safari Technology Preview 15.4 (WebKit 17613.1.9.2);
Comment 1 Radar WebKit Bug Importer 2021-12-23 23:20:15 PST
<rdar://problem/86876886>