Skip to content

Commit

Permalink
fix(GCOM-1385): fix bug where ScrollerThumbnail would scroll the page…
Browse files Browse the repository at this point in the history
… when on the second half of the gallery
  • Loading branch information
Giovanni-Schroevers committed May 22, 2024
1 parent 7b311d3 commit 29e496c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/shaggy-gifts-sip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@graphcommerce/framer-scroller": patch
---

Prevent ScrollerThumbnail from scrolling the page horizontally
2 changes: 1 addition & 1 deletion packages/framer-scroller/components/ScrollerThumbnail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export function ScrollerThumbnail(props: ScrollerThumbnailProps) {
const classes = withState({ active })

const scrollIntoView = () =>
ref.current?.scrollIntoView({ block: 'nearest', inline: 'center', behavior: 'auto' })
ref.current?.scrollIntoView({ block: 'nearest', inline: 'nearest', behavior: 'auto' })

useEffect(() => {
if (active && ref.current) {
Expand Down

0 comments on commit 29e496c

Please sign in to comment.