Fix scrolling on new design

This commit is contained in:
Samy Pessé
2014-04-14 20:08:55 +02:00
parent d6d9223ea1
commit 24d8e15ee2
5 changed files with 9 additions and 6 deletions
+4 -2
View File
@@ -63,6 +63,8 @@ define([
};
var preparePage = function() {
var $pageWrapper = $(".book-body .page-wrapper");
// Bind exercises/quiz
exercises.init();
quiz.init();
@@ -74,10 +76,10 @@ define([
updateNavigationPosition();
// Reset scroll
$(".book-body").scrollTop(0);
$pageWrapper.scrollTop(0);
// Focus on content
$(".book-body").focus();
$pageWrapper.focus();
// Update GitHub count
if (state.githubId) {