Fix scroll on opening subscriptions details

Move the animated scroll from body to the app div.

(imported from commit 2d2062d7a917616a60f414a633dd2f827ae840a0)
This commit is contained in:
Jason Michalski 2014-01-27 13:40:12 -05:00
parent 9cc1dc242c
commit b0c5e2dbd0

View File

@ -746,10 +746,10 @@ $(function () {
// .subscription_header line-height,
// .subscription_header padding
var expanded_row_size = 200 + 30 + 100 + 30 + 5;
var cover = subrow.position().top + expanded_row_size -
viewport.height() + $("#top_navbar").height() - viewport.scrollTop();
var cover = subrow.offset().top + expanded_row_size -
viewport.height() + viewport.scrollTop();
if (cover > 0) {
$('html, body').animate({
$('.app').animate({
scrollTop: viewport.scrollTop() + cover + 5
});
}