Fix scroling position when preparing page

This commit is contained in:
Samy Pessé
2015-03-24 23:52:41 +01:00
parent b7da276ae0
commit f640e101ba
2 changed files with 5 additions and 4 deletions
+4 -3
View File
@@ -72,6 +72,7 @@ define([
};
var preparePage = function() {
var $bodyInner = $(".book-body .body-inner");
var $pageWrapper = $(".book-body .page-wrapper");
// Show progress
@@ -80,12 +81,12 @@ define([
// Update navigation position
updateNavigationPosition();
// Reset scroll
$pageWrapper.scrollTop(0);
// Focus on content
$pageWrapper.focus();
// Reset scroll
$bodyInner.scrollTop(0);
// Notify
events.trigger("page.change");
};