Merge pull request #1512 from thelounge/xpaw/fix-black-previews

Fix image viewer turning black sometimes
This commit is contained in:
Jérémie Astori 2017-09-09 12:45:08 -04:00 committed by GitHub
commit a44eea61a1

View file

@ -161,7 +161,11 @@ function openImageViewer(link) {
hasNextImage: nextImage.length > 0,
}));
imageViewer.addClass("opened");
// Turn off transitionend listener before opening the viewer,
// which caused image viewer to become empty in rare cases
imageViewer
.off("transitionend")
.addClass("opened");
}
imageViewer.on("click", ".previous-image-btn", function() {