mirror of
https://github.com/zadam/trilium.git
synced 2025-01-01 12:52:17 +08:00
fix #5
This commit is contained in:
parent
9c85303c94
commit
b642a567bb
1 changed files with 12 additions and 2 deletions
|
@ -772,12 +772,22 @@ const noteTree = (function() {
|
|||
if (target === 'after') {
|
||||
node.appendSibling(newNode).setActive(true);
|
||||
}
|
||||
else {
|
||||
node.addChildren(newNode).setActive(true);
|
||||
else if (target === 'into') {
|
||||
if (!node.getChildren() && node.isFolder()) {
|
||||
await node.setExpanded();
|
||||
}
|
||||
else {
|
||||
node.addChildren(newNode);
|
||||
}
|
||||
|
||||
node.getLastChild().setActive(true);
|
||||
|
||||
node.folder = true;
|
||||
node.renderTitle();
|
||||
}
|
||||
else {
|
||||
throwError("Unrecognized target: " + target);
|
||||
}
|
||||
|
||||
showMessage("Created!");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue