Skip to content

Build your personal knowledge base with Trilium Notes

fix setting note title on back/forward button click, closes #1334

zadam0afd3c65aad9
diff --git a/src/public/app/services/tab_manager.js b/src/public/app/services/tab_manager.js
index fd29172d43..b6fd5475de 100644
--- a/src/public/app/services/tab_manager.js
+++ b/src/public/app/services/tab_manager.js
@@ -115,13 +115,13 @@ export default class TabManager extends Component {
// using pushState instead of directly modifying document.location because it does not trigger hashchange
window.history.pushState(null, "", url);
+ }
- document.title = "Trilium Notes";
+ document.title = "Trilium Notes";
- if (activeTabContext.note) {
- // it helps navigating in history if note title is included in the title
- document.title += " - " + activeTabContext.note.title;
- }
+ if (activeTabContext.note) {
+ // it helps navigating in history if note title is included in the title
+ document.title += " - " + activeTabContext.note.title;
}
this.triggerEvent('activeNoteChanged'); // trigger this even in on popstate event