Skip to content

Commit

Permalink
add scroll left
Browse files Browse the repository at this point in the history
  • Loading branch information
ludoboludo committed Aug 5, 2021
1 parent 859dc77 commit 1ba0a33
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion assets/variants.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ class VariantSelects extends HTMLElement {
modalContent.prepend(newMediaModal);
parent.prepend(newMedia);
parent.dispatchEvent(this.mediaChangeEvent);
window.setTimeout(() => { parent.scrollIntoView({behavior: "smooth"}); });
parent.scrollLeft = 0;
window.setTimeout(() => { parent.scrollIntoView({behavior: "smooth", inline: "start"}); });
window.setTimeout(() => { this.header.productMediaIsChanging = false;}, 800);
}

Expand Down

0 comments on commit 1ba0a33

Please sign in to comment.