mirror of
https://github.com/zadam/trilium.git
synced 2025-11-17 18:50:41 +01:00
deleting a note will close all tabs containing the note
This commit is contained in:
@@ -267,7 +267,7 @@ async function loadNote(noteId) {
|
||||
async function filterTabs(noteId) {
|
||||
for (const tc of tabContexts) {
|
||||
if (tc.notePath && !tc.notePath.split("/").includes(noteId)) {
|
||||
await tabRow.removeTab(tc.tab);
|
||||
await tabRow.removeTab(tc.$tab[0]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -281,6 +281,14 @@ async function filterTabs(noteId) {
|
||||
await saveOpenTabs();
|
||||
}
|
||||
|
||||
async function noteDeleted(noteId) {
|
||||
for (const tc of tabContexts) {
|
||||
if (tc.notePath && tc.notePath.split("/").includes(noteId)) {
|
||||
await tabRow.removeTab(tc.$tab[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function focusOnTitle() {
|
||||
getActiveTabContext().$noteTitle.focus();
|
||||
}
|
||||
@@ -496,5 +504,6 @@ export default {
|
||||
activateTabContext,
|
||||
clearOpenTabsTask,
|
||||
filterTabs,
|
||||
openEmptyTab
|
||||
openEmptyTab,
|
||||
noteDeleted
|
||||
};
|
||||
Reference in New Issue
Block a user