From 10859fed958dbb3ab3b8d314957701712880604a Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sun, 27 Jul 2014 00:09:02 -0700 Subject: [PATCH] fix bug in scrolling for full image --- src/Images/ImageExpand.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Images/ImageExpand.coffee b/src/Images/ImageExpand.coffee index dd72c17c8..ef2c0909e 100755 --- a/src/Images/ImageExpand.coffee +++ b/src/Images/ImageExpand.coffee @@ -182,7 +182,8 @@ ImageExpand = # Scroll to display full image. imageBottom = Header.getBottomOf file.fullImage - if imageBottom < 0 + {height} = file.fullImage.getBoundingClientRect() + if imageBottom + height >= 0 and imageBottom < 0 window.scrollBy 0, Math.min(-imageBottom, Header.getTopOf file.fullImage) play: (post) ->