From 455778f865be3ecdce872a243670e6190d5fd700 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Wed, 28 Aug 2013 20:32:58 +0200 Subject: [PATCH] Fix image contraction not always moving us back to the post. --- src/Images/ImageExpand.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Images/ImageExpand.coffee b/src/Images/ImageExpand.coffee index b9153461f..a64b75458 100644 --- a/src/Images/ImageExpand.coffee +++ b/src/Images/ImageExpand.coffee @@ -57,7 +57,6 @@ ImageExpand = unless post.file.isExpanded or $.hasClass thumb, 'expanding' ImageExpand.expand post return - ImageExpand.contract post # Scroll back to the thumbnail when contracting the image # to avoid being left miles away from the relevant post. @@ -70,6 +69,7 @@ ImageExpand = if rect.left < 0 x = -window.scrollX window.scrollBy x, y if x or y + ImageExpand.contract post contract: (post) -> $.rmClass post.nodes.root, 'expanded-image'