fix delete with keyboard and context menu regarding the selection

This commit is contained in:
zadam
2019-06-13 22:55:06 +02:00
parent f1967fd466
commit 943b35fb7d
3 changed files with 14 additions and 8 deletions

View File

@@ -453,12 +453,6 @@ function initFancyTree(tree) {
$tree.on('contextmenu', '.fancytree-node', function(e) {
const node = $.ui.fancytree.getNode(e);
// right click resets selection to just this node
// this is important when e.g. you right click on a note while having different note active
// and then click on delete - obviously you want to delete only that one right-clicked
node.setSelected(true);
clearSelectedNodes();
contextMenuWidget.initContextMenu(e, new TreeContextMenu(node));
return false; // blocks default browser right click menu