From b5baab056cf04c2063d21012012628b91ecdf22f Mon Sep 17 00:00:00 2001 From: azivner Date: Sat, 6 Jan 2018 22:53:37 -0500 Subject: [PATCH] enter on title will put focus on editor --- public/javascripts/init.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/javascripts/init.js b/public/javascripts/init.js index 1f23b6062..bb0946911 100644 --- a/public/javascripts/init.js +++ b/public/javascripts/init.js @@ -90,6 +90,8 @@ $(document).bind('keydown', "ctrl+shift+down", () => { return false; }); +$("#note-title").bind('keydown', 'return', () => $("#note-detail").focus()); + $(window).on('beforeunload', () => { // this makes sure that when user e.g. reloads the page or navigates away from the page, the note's content is saved // this sends the request asynchronously and doesn't wait for result