From 99cda335ab970d03e445805c34d6c072ffd1aba7 Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Tue, 25 Sep 2018 18:06:03 +0300 Subject: [PATCH] Fix next/prev buttons in media viewer --- client/js/renderPreview.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/js/renderPreview.js b/client/js/renderPreview.js index a99f5b1c..2ff0f1b9 100644 --- a/client/js/renderPreview.js +++ b/client/js/renderPreview.js @@ -48,22 +48,22 @@ function openImageViewer(link, {pushState = true} = {}) { // Previous image let previousImage = link.closest(".preview").prev(".preview") - .find(".toggle-content.show .toggle-thumbnail").last(); + .find(".toggle-content .toggle-thumbnail").last(); if (!previousImage.length) { previousImage = link.closest(".msg").prevAll() - .find(".toggle-content.show .toggle-thumbnail").last(); + .find(".toggle-content .toggle-thumbnail").last(); } previousImage.addClass("previous-image"); // Next image let nextImage = link.closest(".preview").next(".preview") - .find(".toggle-content.show .toggle-thumbnail").first(); + .find(".toggle-content .toggle-thumbnail").first(); if (!nextImage.length) { nextImage = link.closest(".msg").nextAll() - .find(".toggle-content.show .toggle-thumbnail").first(); + .find(".toggle-content .toggle-thumbnail").first(); } nextImage.addClass("next-image");