From 01ede22504728e18f9e3527f4c2b1839e552cb95 Mon Sep 17 00:00:00 2001 From: azivner Date: Wed, 3 Jan 2018 22:49:53 -0500 Subject: [PATCH] added backspace to move to parent node --- public/javascripts/note_tree.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/public/javascripts/note_tree.js b/public/javascripts/note_tree.js index 6448a4398..47b126f24 100644 --- a/public/javascripts/note_tree.js +++ b/public/javascripts/note_tree.js @@ -490,12 +490,14 @@ const noteTree = (function() { return false; }, - "ctrl+return": node => { - noteDetailEl.focus(); - }, "return": node => { noteDetailEl.focus(); }, + "backspace": node => { + if (!isTopLevelNode(node)) { + node.getParent().setActive().then(() => clearSelectedNodes()); + } + }, // code below shouldn't be necessary normally, however there's some problem with interaction with context menu plugin // after opening context menu, standard shortcuts don't work, but they are detected here // so we essentially takeover the standard handling with our implementation.