diff --git a/.changeset/loud-bags-cross.md b/.changeset/loud-bags-cross.md new file mode 100644 index 0000000000..a022d875bb --- /dev/null +++ b/.changeset/loud-bags-cross.md @@ -0,0 +1,6 @@ +--- +'@shopify/create-hydrogen': patch +'skeleton': patch +--- + +Prevent scroll reset on variant change diff --git a/templates/skeleton/app/components/ProductForm.tsx b/templates/skeleton/app/components/ProductForm.tsx index ac38f68521..e8616a6189 100644 --- a/templates/skeleton/app/components/ProductForm.tsx +++ b/templates/skeleton/app/components/ProductForm.tsx @@ -86,6 +86,7 @@ export function ProductForm({ if (!selected) { navigate(`?${variantUriQuery}`, { replace: true, + preventScrollReset: true, }); } }} @@ -98,7 +99,7 @@ export function ProductForm({
- ) + ); })}