It seems the test intermittently gets a slightly different value after the first scrollIntoView. One first thing we can check is try to use `behavior: "instant"` in the `scrollIntoView` options. But I also stumbled upon Bug 1874551, where they have a test related to the issue we have here, and they seem to wait for a couple of request animation frames after the scrollIntoView. So we could also try that?
Bug 1906095 Comment 10 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
It seems the test intermittently gets a slightly different value after the first scrollIntoView. One first thing we can check is try to use `behavior: "instant"` in the `scrollIntoView` options. But I also stumbled upon Bug 1874551, where they have a test related to the issue we have here, and they seem to wait for a couple of request animation frames after the scrollIntoView. So we could also try that? Edit: They actually wait for a scroll event right after the scrollIntoView. The rAF is only used for the second call.