Merge pull request #1512 from thelounge/xpaw/fix-black-previews
Fix image viewer turning black sometimes
This commit is contained in:
commit
a44eea61a1
@ -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() {
|
||||||
|
Loading…
Reference in New Issue
Block a user