mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-24 11:26:31 +00:00
Fix scroling position when preparing page
This commit is contained in:
@@ -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");
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user