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
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+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) {
+1
View File
@@ -20,6 +20,7 @@
.page-wrapper {
position: relative;
outline: none;
.page-inner {
font-family: @font-family-serif;
+2 -2
View File
@@ -5,9 +5,9 @@
<div class="book" {% if githubId %}data-github="{{ githubId }}"{% endif %} data-level="{{ progress.current.level }}" data-basepath="{{ basePath }}" data-revision="{{ revision }}">
{% include "includes/book/header.html" %}
{% include "includes/book/summary.html" %}
<div class="book-body" tabindex="-1">
<div class="book-body">
<div class="body-inner">
<div class="page-wrapper">
<div class="page-wrapper" tabindex="-1">
{% include "includes/book/progress.html" %}
<div class="page-inner">