Closed emilio closed 1 year ago
With my webdev hat on, I find Firefox's implementation to be less surprising. @szager-chromium WDYT?
Cc @tcaptan-cr, wonder if there's any opinion here. I think this is an obvious spec bug / oversight.
Cc @tcaptan-cr, wonder if there's any opinion here. I think this is an obvious spec bug / oversight.
I agree that the scrollport rect would be better.
https://w3c.github.io/IntersectionObserver/#intersectionobserver-root-intersection-rectangle says to use the "content area" when the element has scrollable overflow, however this seems wrong when there's padding.
Consider this test-case: https://codepen.io/jelmerdemaat/pen/wvjLMRN
Unless I'm missing something, the intent of the spec is to not include the scrollbar and borders, but I believe the correct behavior is Firefox's.
See https://bugzilla.mozilla.org/show_bug.cgi?id=1796268
@miketaylr @szager-chromium do you agree?