Fixed broken scrolling when changing albums<->album views

This commit is contained in:
Roman 2014-09-14 15:31:58 +03:00
parent e9544e8f8f
commit b8020fb1ff

View File

@ -121,6 +121,8 @@ view = {
},
content: {
scroll_pos: 0,
init: function() {
@ -155,6 +157,12 @@ view = {
}
$("img[data-type!='nonretina']").retina();
//restore scroll
if (view.albums.content.scroll_pos != null) {
//$("html, body").setanimate({ scrollTop: view.albums.content.scroll_pos }, "slow");
$("html, body").scrollTop(view.albums.content.scroll_pos);
}
},
@ -253,6 +261,7 @@ view = {
$("img[data-type!='svg']").retina();
view.albums.content.scroll_pos = $(document).scrollTop();
//scroll to top
$("html, body").animate({ scrollTop: 0 }, "slow");