mirror of
https://github.com/zadam/trilium.git
synced 2025-12-20 07:09:54 +01:00
Use Ctrl + Shift + Click on the launcher pane to open and activate in a new tab.
This commit is contained in:
@@ -28,15 +28,21 @@ export default class OpenNoteButtonWidget extends OnClickButtonWidget {
|
||||
if (evt.which === 3) {
|
||||
return;
|
||||
}
|
||||
const hoistedNoteId = this.getHoistedNoteId();
|
||||
const ctrlKey = utils.isCtrlKey(evt);
|
||||
|
||||
if ((evt.which === 1 && ctrlKey) || evt.which === 2) {
|
||||
await appContext.tabManager.openInNewTab(this.noteToOpen.noteId);
|
||||
const activate = evt.shiftKey ? true : false;
|
||||
await appContext.tabManager.openInNewTab(this.noteToOpen.noteId, hoistedNoteId, activate);
|
||||
} else {
|
||||
await appContext.tabManager.openInSameTab(this.noteToOpen.noteId);
|
||||
}
|
||||
}
|
||||
|
||||
getHoistedNoteId() {
|
||||
return this.noteToOpen.getRelationValue("hoistedNote") || appContext.tabManager.getActiveContext()?.hoistedNoteId;
|
||||
}
|
||||
|
||||
initialRenderCompleteEvent() {
|
||||
// we trigger refresh above
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user