diff --git a/src/Images/ImageExpand.coffee b/src/Images/ImageExpand.coffee index 61f3d232f..ba402b26b 100755 --- a/src/Images/ImageExpand.coffee +++ b/src/Images/ImageExpand.coffee @@ -88,6 +88,8 @@ ImageExpand = 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. {root} = post.nodes @@ -110,7 +112,6 @@ ImageExpand = if left < 0 x = -window.scrollX window.scrollBy x, y if x or y - ImageExpand.contract post contract: (post) -> {file} = post