From d0aa2614bc076fa83b41f5ad41c975db149ed55d Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Tue, 10 Feb 2009 02:04:37 -0800 Subject: [PATCH] Properly handling hitting page-up at the top or page-down at the bottom of the notes. --- static/js/Wiki.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/static/js/Wiki.js b/static/js/Wiki.js index 09025a9..327cca4 100644 --- a/static/js/Wiki.js +++ b/static/js/Wiki.js @@ -1213,6 +1213,8 @@ Wiki.prototype.focus_previous_editor = function () { } var previous_editor = this.focused_editor.previous_editor(); + if ( !previous_editor ) return; + this.editor_focused( null ); previous_editor.highlight(); } @@ -1226,6 +1228,8 @@ Wiki.prototype.focus_next_editor = function () { } var next_editor = this.focused_editor.next_editor(); + if ( !next_editor ) return; + this.editor_focused( null ); next_editor.highlight(); }