Bug 235874 - Absolutely positioned element at top -9999999em disables scrolling
Summary: Absolutely positioned element at top -9999999em disables scrolling
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari 15
Hardware: Mac (Intel) macOS 12
: P2 Normal
Assignee: Nobody
Keywords: InRadar
Depends on:
Reported: 2022-01-30 14:20 PST by Gabriele Romanato
Modified: 2022-02-02 09:30 PST (History)
3 users (show)

See Also:

Miminal test case (7.20 KB, text/html)
2022-01-30 14:20 PST, Gabriele Romanato
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabriele Romanato 2022-01-30 14:20:47 PST
Created attachment 450368 [details]
Miminal test case

Having an element negatively positioned outside the viewport, negative contextual positioning (i.e. the immediate ancestor is relatively positioned)
disables vertical scrolling on the whole document when the content of the positioned element has been hidden via the overflow property.

Minimal test case (attached):

Comment 1 Simon Fraser (smfr) 2022-01-31 09:41:17 PST
Looks like we hit LayoutUnit limits when computing overflow.
Comment 2 Simon Fraser (smfr) 2022-01-31 09:42:06 PST
Simple workaround is to use smaller negative offset.
Comment 3 Radar WebKit Bug Importer 2022-01-31 09:43:29 PST