mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-01-31 12:23:48 +01:00
Merge pull request #301 from topkek/image-expanding
Scroll to thumbnail when shrinking an expanded image
This commit is contained in:
commit
26d78b1ce5
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user