(intersection-observer) Chrome allows an empty string for rootMargin, Firefox throws an exception, breaking some shopping sites.
Categories
(Core :: Layout, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox96 | --- | fixed |
People
(Reporter: twisniewski, Assigned: emilio)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-complete)
Attachments
(1 file)
Chrome apparently allows passing in an empty string as rootMargin, while Firefox throws this exception:
DOMException: IntersectionObserver constructor: rootMargin must be specified in pixels or percent.
This is breaking at least two shopping site pages completely, as they rely on the same (or very similar) scripts from https://*.b2w.io/catalog-statics/js/
:
Assignee | ||
Comment 1•3 years ago
|
||
The spec seems clear that with zero tokens we should just fall back to the default: https://w3c.github.io/IntersectionObserver/#parse-a-root-margin
Astounding if there's no test for this.
Assignee | ||
Comment 2•3 years ago
|
||
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Comment 4•3 years ago
|
||
Backed out changeset f8c0561be4db (Bug 1738791) for causing failures in observer-attributes.html CLOSED TREE
Log: https://treeherder.mozilla.org/logviewer?job_id=356705925&repo=autoland&lineNumber=11816
Backout: https://hg.mozilla.org/integration/autoland/rev/cfa8fc5e0f8c1d4c0625feabf897230ec47f0816
Assignee | ||
Updated•3 years ago
|
Comment 6•3 years ago
|
||
bugherder |
Comment 7•3 years ago
|
||
FYI FF96 docs work for this can be tracked in https://github.com/mdn/content/issues/10854#issuecomment-987580613 . This is mostly just a release note and addition of a note to the browser compatibility data.
Description
•