Skip to content

Commit a1173a3

Browse files
authored
fix scrolling scenario on mobile (#3286)
1 parent 3bba771 commit a1173a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

assets/media-gallery.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ if (!customElements.get('media-gallery')) {
4646

4747
this.preventStickyHeader();
4848
window.setTimeout(() => {
49-
if (this.elements.thumbnails) {
49+
if (!this.mql.matches || this.elements.thumbnails) {
5050
activeMedia.parentElement.scrollTo({ left: activeMedia.offsetLeft });
5151
}
5252
const activeMediaRect = activeMedia.getBoundingClientRect();

0 commit comments

Comments
 (0)