Bug 235874

Summary: Absolutely positioned element at top -9999999em disables scrolling
Product: WebKit Reporter: Gabriele Romanato <gabriele>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: Safari 15   
Hardware: Mac (Intel)   
OS: macOS 12   
Attachments:
Description Flags
Miminal test case none

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):

https://gabrieleromanato.dev/test/css/safari-negative-positioning-overflow.html
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
<rdar://problem/88276643>