From eee06a4b905b5e611c24afb3327c9c2850e02623 Mon Sep 17 00:00:00 2001 From: azivner Date: Sun, 17 Dec 2017 16:40:38 -0500 Subject: [PATCH] ctrl+insert now works globally - i.e. inside editor --- public/javascripts/init.js | 1 - public/javascripts/note_tree.js | 9 ++++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/public/javascripts/init.js b/public/javascripts/init.js index ab36b2441..3fb83f5ff 100644 --- a/public/javascripts/init.js +++ b/public/javascripts/init.js @@ -39,7 +39,6 @@ $(document).bind('keydown', 'ctrl+shift+i', () => { } }); - $(document).bind('keydown', 'ctrl+f', () => { if (isElectron()) { const searchInPage = require('electron-in-page-search').default; diff --git a/public/javascripts/note_tree.js b/public/javascripts/note_tree.js index 1d5174a09..42eb8b842 100644 --- a/public/javascripts/note_tree.js +++ b/public/javascripts/note_tree.js @@ -363,9 +363,6 @@ const noteTree = (function() { createNote(node, parentNoteId, 'after', isProtected); }, - "ctrl+insert": node => { - createNote(node, node.data.note_id, 'into', node.data.is_protected); - }, "del": node => { treeChanges.deleteNode(node); }, @@ -647,6 +644,12 @@ const noteTree = (function() { showMessage("Created!"); } + $(document).bind('keydown', 'ctrl+insert', () => { + const node = getCurrentNode(); + + createNote(node, node.data.note_id, 'into', node.data.is_protected); + }); + return { reload, collapseTree,