1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-29 09:44:28 +01:00

Scroll to thumbnail when shrinking an expanded image

This commit is contained in:
topkek 2014-12-09 02:04:53 +00:00
parent 8165dd6f66
commit 96d69c52f2

View File

@ -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);
}
}