Skip to content

Commit 29708db

Browse files
authored
Merge pull request #337 from budziq/focus_fix
Select right pane content on page load
2 parents 9e9a088 + c1c06d6 commit 29708db

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

src/theme/book.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ table thead td {
137137
right: 0;
138138
left: 0;
139139
bottom: 0;
140+
outline: 0;
140141
padding-right: 15px;
141142
overflow-y: auto;
142143
}

src/theme/book.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ $( document ).ready(function() {
5252

5353
// Interesting DOM Elements
5454
var sidebar = $("#sidebar");
55-
var page_wrapper = $("#page-wrapper");
56-
var content = $("#content");
55+
56+
// Help keyboard navigation by always focusing on page content
57+
$(".page").focus();
5758

5859
// Toggle sidebar
5960
$("#sidebar-toggle").click(sidebarToggle);

src/theme/index.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676

7777
<div id="page-wrapper" class="page-wrapper">
7878

79-
<div class="page">
79+
<div class="page" tabindex="-1">
8080
<div id="menu-bar" class="menu-bar">
8181
<div class="left-buttons">
8282
<i id="sidebar-toggle" class="fa fa-bars"></i>

src/theme/stylus/page.styl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
right: 0
3636
left: 0
3737
bottom: 0
38+
outline: 0
3839

3940
padding-right: 15px
4041
overflow-y: auto

0 commit comments

Comments
 (0)