diff --git a/packages/overlay/stories/index.ts b/packages/overlay/stories/index.ts index 18a25a5211..654d6acbaf 100644 --- a/packages/overlay/stories/index.ts +++ b/packages/overlay/stories/index.ts @@ -43,6 +43,11 @@ class IsOverlayOpen extends HTMLElement { if (selectedItem) { selectedItem.focus(); selectedItem.focused = true; + + // scroll the selected item into view with block start alignment to ensure consistent behavior in VRTs + await nextFrame(); + selectedItem.scrollIntoView({ block: 'start' }); + await nextFrame(); } };