Skip to content

Commit

Permalink
fix scrolling scenario on mobile (#3286)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludoboludo authored Feb 20, 2024
1 parent 3bba771 commit a1173a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/media-gallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ if (!customElements.get('media-gallery')) {

this.preventStickyHeader();
window.setTimeout(() => {
if (this.elements.thumbnails) {
if (!this.mql.matches || this.elements.thumbnails) {
activeMedia.parentElement.scrollTo({ left: activeMedia.offsetLeft });
}
const activeMediaRect = activeMedia.getBoundingClientRect();
Expand Down

0 comments on commit a1173a3

Please sign in to comment.