Skip to content

Commit a2d570b

Browse files
authoredNov 30, 2022
fix(segment): scrolling button into view is more consistent (#26369)
resolves #26368
1 parent 88d327b commit a2d570b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
 

‎core/src/components/segment/segment.tsx

+9
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,15 @@ export class Segment implements ComponentInterface {
101101
activeButton.scrollIntoView({
102102
behavior: 'smooth',
103103
inline: 'center',
104+
105+
/**
106+
* Segment should scroll on the
107+
* horizontal axis. `block: 'nearest'`
108+
* ensures that the vertical axis
109+
* does not scroll if the segment
110+
* as a whole is already in view.
111+
*/
112+
block: 'nearest',
104113
});
105114
}
106115
}

0 commit comments

Comments
 (0)
Please sign in to comment.