summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortopkek <topkek@users.noreply.github.com>2014-12-09 02:04:53 +0000
committerczaks <marcin@6irc.net>2016-05-05 12:10:09 +0200
commit63491b0b9a4a9325bb8f68d0c5763ac3cda68c89 (patch)
treea185b06d1ac330ba000a93a8926e22eb0643b5c7
parentfd2b41c1f0d1a2d091f8ee66880b230301b823cc (diff)
Scroll to thumbnail when shrinking an expanded image
-rw-r--r--js/inline-expanding.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/inline-expanding.js b/js/inline-expanding.js
index 8da66898..05300138 100644
--- a/js/inline-expanding.js
+++ b/js/inline-expanding.js
@@ -74,10 +74,10 @@ onready(function(){
if (still_open > 1) {
if (e.target.getBoundingClientRect().top - padding < 0)
- $('body').scrollTop($(e.target).parent().parent().offset().top - padding);
+ $(document).scrollTop($(e.target).parent().parent().offset().top - padding);
} else {
if (post_body[0].getBoundingClientRect().top - padding < 0)
- $('body').scrollTop(post_body.offset().top - padding);
+ $(document).scrollTop(post_body.offset().top - padding);
}
}