From 1b3a113639cd90f4743ee1f4e5cbb93cb971d1f6 Mon Sep 17 00:00:00 2001 From: azivner Date: Fri, 25 Aug 2017 19:30:26 -0400 Subject: [PATCH] correct tabindex so that tab from note title jumps to note content --- src/templates/app.html | 2 +- static/js/note.js | 3 +++ static/js/notecase2html.js | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/templates/app.html b/src/templates/app.html index f1114faf1..3171ea999 100644 --- a/src/templates/app.html +++ b/src/templates/app.html @@ -27,7 +27,7 @@
- +
diff --git a/static/js/note.js b/static/js/note.js index 7eb644ae6..cdbfc0627 100644 --- a/static/js/note.js +++ b/static/js/note.js @@ -76,6 +76,9 @@ $(document).ready(function() { onChange: noteChanged } }); + + // so that tab jumps from note title (which has tabindex 1) + $(".note-editable").attr("tabindex", 2); }); var globalNote; diff --git a/static/js/notecase2html.js b/static/js/notecase2html.js index 52eb7824a..54e56c721 100644 --- a/static/js/notecase2html.js +++ b/static/js/notecase2html.js @@ -7,7 +7,7 @@ function notecase2html(note) { let all = note.formatting.concat(note.links).concat(note.images); all.sort(function compare(a, b) { - return a.note_offset - b.note_offset; + return a.note_offset - b.note_offset; }); let offset = 0;