Skip to content

Commit

Permalink
Incorrect scrollIntoView options in adjustment-followed-by-scrollBy.html
Browse files Browse the repository at this point in the history
The test passes with or without the change, but normally scrollIntoView only takes one argument

Differential Revision: https://phabricator.services.mozilla.com/D216449

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1907647
gecko-commit: ec2e67e645c32711c025d2a629d0e1635c0ba23b
gecko-reviewers: hiro
  • Loading branch information
juliandescottes authored and moz-wptsync-bot committed Jul 17, 2024
1 parent 48b19a4 commit e9503de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions css/css-scroll-anchoring/adjustment-followed-by-scrollBy.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
assert_equals(window.scrollY, 0);

// Center an element.
center.scrollIntoView({ block: "center" }, { behavior: "instant" });
center.scrollIntoView({ block: "center", behavior: "instant" });
await new Promise(resolve => window.addEventListener("scroll", resolve));

const originalPosition = center.getBoundingClientRect().top;
Expand All @@ -50,7 +50,7 @@

// Now try to scrollIntoView({ block: "center" }) and make sure the position
// is unchanged.
center.scrollIntoView({ block: "center" }, { behavior: "instant" });
center.scrollIntoView({ block: "center", behavior: "instant" });

// Wait two frames to be able to scroll if it's possible.
await new Promise(resolve => requestAnimationFrame(resolve));
Expand Down

0 comments on commit e9503de

Please sign in to comment.