Skip to content

Commit

Permalink
Merge pull request #2275 from graphcommerce-org/fix/GCOM-1385
Browse files Browse the repository at this point in the history
fix(GCOM-1385): fix bug where ScrollerThumbnail would scroll the page when on the second half of the gallery
  • Loading branch information
paales authored May 22, 2024
2 parents 7b311d3 + 29e496c commit 97c5393
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 97c5393

Please sign in to comment.