Skip to content

Build your personal knowledge base with Trilium Notes

open links in new tab without activation

zadam3ab2b41e8cc4
diff --git a/src/public/javascripts/services/link.js b/src/public/javascripts/services/link.js
index 269e3c44c5..a9b9958d0e 100644
--- a/src/public/javascripts/services/link.js
+++ b/src/public/javascripts/services/link.js
@@ -78,7 +78,6 @@ function goToLink(e) {
if (notePath) {
if ((e.which === 1 && e.ctrlKey) || e.which === 2) {
const tabContext = appContext.tabManager.openEmptyTab();
- appContext.tabManager.activateTab(tabContext.tabId);
tabContext.setNote(notePath);
}
else if (e.which === 1) {
@@ -142,7 +141,6 @@ $(document).on('mousedown', '.note-detail-text a', function (e) {
if (notePath) {
const tabContext = appContext.tabManager.openEmptyTab();
tabContext.setNote(notePath);
- appContext.tabManager.activateTab(tabContext.tabId);
}
else {
const address = $link.attr('href');
diff --git a/src/public/javascripts/services/tree_context_menu.js b/src/public/javascripts/services/tree_context_menu.js
index f848b2fe7a..3768f53af7 100644
--- a/src/public/javascripts/services/tree_context_menu.js
+++ b/src/public/javascripts/services/tree_context_menu.js
@@ -109,7 +109,6 @@ class TreeContextMenu {
if (command === 'openInTab') {
const tabContext = appContext.tabManager.openEmptyTab();
- appContext.tabManager.activateTab(tabContext.tabId);
tabContext.setNote(notePath);
}
else if (command === "insertNoteAfter") {
diff --git a/src/public/javascripts/widgets/note_tree.js b/src/public/javascripts/widgets/note_tree.js
index 93812e8155..a5f15767ae 100644
--- a/src/public/javascripts/widgets/note_tree.js
+++ b/src/public/javascripts/widgets/note_tree.js
@@ -84,7 +84,6 @@ export default class NoteTreeWidget extends TabAwareWidget {
const tabContext = appContext.tabManager.openEmptyTab();
const notePath = treeService.getNotePath(node);
tabContext.setNote(notePath);
- appContext.tabManager.activateTab(tabContext.tabId);
}
else {
node.setActive();