From 63491b0b9a4a9325bb8f68d0c5763ac3cda68c89 Mon Sep 17 00:00:00 2001 From: topkek Date: Tue, 9 Dec 2014 02:04:53 +0000 Subject: [PATCH] Scroll to thumbnail when shrinking an expanded image --- js/inline-expanding.js | 4 ++-- 1 file 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); } }