Fixed saved scrolling position
This commit is contained in:
parent
4a6a86e7c7
commit
e6c109269e
BIN
dist/main.js
vendored
BIN
dist/main.js
vendored
Binary file not shown.
@ -175,7 +175,7 @@ view.albums = {
|
||||
|
||||
// Restore scroll position
|
||||
if (view.albums.content.scrollPosition!==null) {
|
||||
$('html, body').scrollTop(view.albums.content.scrollPosition);
|
||||
$(document).scrollTop(view.albums.content.scrollPosition);
|
||||
}
|
||||
|
||||
},
|
||||
@ -269,6 +269,10 @@ view.album = {
|
||||
|
||||
var photosData = '';
|
||||
|
||||
// Save and reset scroll position
|
||||
view.albums.content.scrollPosition = $(document).scrollTop();
|
||||
$('html, body').scrollTop(0);
|
||||
|
||||
$.each(album.json.content, function() {
|
||||
photosData += build.photo(this);
|
||||
});
|
||||
@ -276,10 +280,6 @@ view.album = {
|
||||
|
||||
$('img[data-type!="svg"]').retina();
|
||||
|
||||
/* Save and reset scroll position */
|
||||
view.albums.content.scrollPosition = $(document).scrollTop();
|
||||
$('html, body').scrollTop(0);
|
||||
|
||||
},
|
||||
|
||||
title: function(photoID) {
|
||||
|
Loading…
Reference in New Issue
Block a user