ps-image: fix content load image

pull/460/head
Varun Patil 2023-02-25 22:07:57 -08:00
parent 8ae1fc8ddd
commit da6c681bbf
1 changed files with 6 additions and 0 deletions

View File

@ -10,6 +10,7 @@ export default class ImageContentSetup {
initLightboxEvents(lightbox: PhotoSwipe) {
lightbox.on("contentLoad", this.onContentLoad.bind(this));
lightbox.on("contentLoadImage", this.onContentLoadImage.bind(this));
}
onContentLoad(e) {
@ -32,4 +33,9 @@ export default class ImageContentSetup {
};
});
}
onContentLoadImage(e) {
if (isVideoContent(e.content) || isLiveContent(e.content)) return;
e.preventDefault();
}
}