Bug 234427 - scrollBy(0, 0) causes scrolling when zoomed in
Summary: scrollBy(0, 0) causes scrolling when zoomed in
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: Safari 15
Hardware: Mac (Apple Silicon) macOS 12
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-12-16 23:19 PST by Rio
Modified: 2021-12-23 23:20 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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>