mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
Merge remote-tracking branch 'origin/stable'
This commit is contained in:
commit
1a4f35470c
@ -382,8 +382,6 @@ export default class NoteTreeWidget extends TabAwareWidget {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
node.setActive();
|
node.setActive();
|
||||||
|
|
||||||
this.clearSelectedNodes();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@ -393,6 +391,8 @@ export default class NoteTreeWidget extends TabAwareWidget {
|
|||||||
// click event won't propagate so let's close context menu manually
|
// click event won't propagate so let's close context menu manually
|
||||||
contextMenu.hide();
|
contextMenu.hide();
|
||||||
|
|
||||||
|
this.clearSelectedNodes();
|
||||||
|
|
||||||
const notePath = treeService.getNotePath(data.node);
|
const notePath = treeService.getNotePath(data.node);
|
||||||
|
|
||||||
const activeTabContext = appContext.tabManager.getActiveTabContext();
|
const activeTabContext = appContext.tabManager.getActiveTabContext();
|
||||||
@ -1144,11 +1144,12 @@ export default class NoteTreeWidget extends TabAwareWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (node) {
|
if (node) {
|
||||||
node.setActive(true, {noEvents: true, noFocus: !activeNodeFocused});
|
|
||||||
|
|
||||||
if (activeNodeFocused) {
|
if (activeNodeFocused) {
|
||||||
node.setFocus(true);
|
// needed by Firefox: https://github.com/zadam/trilium/issues/1865
|
||||||
|
this.tree.$container.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await node.setActive(true, {noEvents: true, noFocus: !activeNodeFocused});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// this is used when original note has been deleted and we want to move the focus to the note above/below
|
// this is used when original note has been deleted and we want to move the focus to the note above/below
|
||||||
|
Loading…
x
Reference in New Issue
Block a user