w3c / IntersectionObserver

Intersection Observer
https://www.w3.org/TR/intersection-observer/
Other
3.62k stars 531 forks source link

Should scrollMargin be applied to display:hidden containers? #521

Closed szager-chromium closed 3 months ago

szager-chromium commented 4 months ago

According to the spec, scrollMargin is applied only to scrollPorts, and display:hidden does not qualify as a scrollport because it doesn't "allow the user to scroll clipped parts of its scrollable overflow area into view". But many of the scroll-margin WPT use overflow:hidden with the expectation that scrollMargin will be applied.

tcaptan-cr commented 4 months ago

Scrollports should allow for script scrolling as well. The intent with scrollMargin was support both user and script scrolling.

tcaptan-cr commented 3 months ago

Resolved via Clarify that scripts can also scroll a scroll container