There was an error while loading. Please reload this page.
2 parents c30eb3d + 252596b commit 663d771Copy full SHA for 663d771
1 file changed
src/components/ui/Slider.tsx
@@ -123,6 +123,11 @@ function useSlider(
123
if (entry.isIntersecting) {
124
dot?.setAttribute("disabled", "");
125
dot?.setAttribute("aria-current", "true");
126
+ // Keep the active dot in view — matters for scrollable thumbnail
127
+ // strips (e.g. the PDP gallery with many images). `nearest` only
128
+ // scrolls when needed, so it's a no-op for the small dot rows of
129
+ // the Carousel/Logos sliders and never scrolls the page.
130
+ dot?.scrollIntoView({ block: "nearest", inline: "nearest" });
131
} else {
132
dot?.removeAttribute("disabled");
133
dot?.removeAttribute("aria-current");
0 commit comments