Fixed broken scrolling when changing albums<->album views
This commit is contained in:
parent
e9544e8f8f
commit
b8020fb1ff
@ -122,6 +122,8 @@ view = {
|
|||||||
|
|
||||||
content: {
|
content: {
|
||||||
|
|
||||||
|
scroll_pos: 0,
|
||||||
|
|
||||||
init: function() {
|
init: function() {
|
||||||
|
|
||||||
var smartData = "",
|
var smartData = "",
|
||||||
@ -156,6 +158,12 @@ view = {
|
|||||||
|
|
||||||
$("img[data-type!='nonretina']").retina();
|
$("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);
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
title: function(albumID) {
|
title: function(albumID) {
|
||||||
@ -253,6 +261,7 @@ view = {
|
|||||||
|
|
||||||
$("img[data-type!='svg']").retina();
|
$("img[data-type!='svg']").retina();
|
||||||
|
|
||||||
|
view.albums.content.scroll_pos = $(document).scrollTop();
|
||||||
//scroll to top
|
//scroll to top
|
||||||
$("html, body").animate({ scrollTop: 0 }, "slow");
|
$("html, body").animate({ scrollTop: 0 }, "slow");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user