Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: make scroll consistent in long popover vrts #4957

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ parameters:
# 3. Commit this change to the PR branch where the changes exist.
current_golden_images_hash:
type: string
default: a095ed1ef88686fdb24936dad763598ac7981193
default: 03de44874948c293372acb6b696a2c396eda1d96
wireit_cache_name:
type: string
default: wireit
Expand Down
5 changes: 5 additions & 0 deletions packages/overlay/stories/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
};

Expand Down
Loading