Fix scroll position for the 'browse' pane.

This commit is contained in:
jcass 2017-01-22 10:15:38 +02:00
parent 466b805062
commit 0e6e15e8e5

View File

@ -378,7 +378,9 @@ function locationHashChanged () {
$('.pane').hide() // Hide all pages $('.pane').hide() // Hide all pages
$('#' + divid + 'pane').show() // Switch to active pane $('#' + divid + 'pane').show() // Switch to active pane
if (typeof pageScrollPos[divid] !== 'undefined') { // Set scroll position if (divid === 'browse' && browseStack.length > 0) {
window.scrollTo(0, browseStack[browseStack.length - 1].scrollPos || 0) // Restore scroll position
} else if (typeof pageScrollPos[divid] !== 'undefined') { // Set scroll position
window.scrollTo(0, pageScrollPos[divid]) window.scrollTo(0, pageScrollPos[divid])
} }