From a092b5e39a901f12f576055b1571428c5f758ec4 Mon Sep 17 00:00:00 2001 From: Franzz Date: Wed, 14 Sep 2022 16:54:11 +0200 Subject: [PATCH] Prevent feed scroll when triggered from markers --- masks/project.html | 2 +- script/lightbox.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/masks/project.html b/masks/project.html index 411074c..c5fd5d3 100644 --- a/masks/project.html +++ b/masks/project.html @@ -186,7 +186,7 @@ function initPage(asHash) { hasVideo: true, onMediaChange: (oMedia) => { oSpot.updateHash('media', oMedia.id); - goToPost({type: 'media', id: oMedia.id}); + if(oMedia.set == 'post-medias') goToPost({type: 'media', id: oMedia.id}); } }); diff --git a/script/lightbox.js b/script/lightbox.js index 81651d3..386284f 100644 --- a/script/lightbox.js +++ b/script/lightbox.js @@ -387,6 +387,7 @@ , $Media: $link.attr('data-type')=='video'?this.$video:this.$image , width: $link.find('img').attr('width') , height: $link.find('img').attr('height') + , set: $link.attr('data-lightbox') || $link.attr('rel') //ADDED-END }); }