diff --git a/packages/html-reporter/src/links.tsx b/packages/html-reporter/src/links.tsx
index a6ea1e6695..b8db4c0e9e 100644
--- a/packages/html-reporter/src/links.tsx
+++ b/packages/html-reporter/src/links.tsx
@@ -143,7 +143,7 @@ export function useIsAnchored(id: AnchorID) {
export function Anchor({ id, children }: React.PropsWithChildren<{ id: AnchorID }>) {
const ref = React.useRef(null);
const onAnchorReveal = React.useCallback(() => {
- requestAnimationFrame(() => ref.current?.scrollIntoView({ block: 'start', inline: 'start' }));
+ ref.current?.scrollIntoView({ block: 'start', inline: 'start' });
}, []);
useAnchor(id, onAnchorReveal);
diff --git a/tests/playwright-test/reporter-html.spec.ts b/tests/playwright-test/reporter-html.spec.ts
index 5568455d63..556d12e8a2 100644
--- a/tests/playwright-test/reporter-html.spec.ts
+++ b/tests/playwright-test/reporter-html.spec.ts
@@ -936,6 +936,9 @@ for (const useIntermediateMergeReport of [true, false] as const) {
await expect(attachment).not.toBeInViewport();
await page.getByLabel('attach "foo-2"').getByTitle('link to attachment').click();
await expect(attachment).toBeInViewport();
+
+ await page.reload();
+ await expect(attachment).toBeInViewport();
});
test('should highlight textual diff', async ({ runInlineTest, showReport, page }) => {