Fix image viewer turning black sometimes

This commit is contained in:
Pavel Djundik 2017-09-09 13:22:49 +03:00
parent 3b049f174c
commit 67da82c151

View File

@ -161,7 +161,11 @@ function openImageViewer(link) {
hasNextImage: nextImage.length > 0, 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() { imageViewer.on("click", ".previous-image-btn", function() {