mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-21 01:53:26 +00:00
Fix scrolling on new design
This commit is contained in:
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -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) {
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
.page-wrapper {
|
||||
position: relative;
|
||||
outline: none;
|
||||
|
||||
.page-inner {
|
||||
font-family: @font-family-serif;
|
||||
|
||||
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user