Skip to content

Build your personal knowledge base with Trilium Notes

fix update of window title during note renaming

zadamd49cae9cea5c
diff --git a/package-lock.json b/package-lock.json
index fe7608350a..ebf523b4a8 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -2820,9 +2820,9 @@
"integrity": "sha512-PcW2a0tyTuPHz3tWyYqtK6r1fZ3gp+3Sop8Ph+ZYN81Ob5rwmbHEzaqs10N3BEsaGTkh/ooniXK+WwszGlc2+Q=="
},
"electron": {
- "version": "6.0.0-beta.9",
- "resolved": "https://registry.npmjs.org/electron/-/electron-6.0.0-beta.9.tgz",
- "integrity": "sha512-tbBpSamFzD1ayJhF+sUo56e7qD+djdMOPh8B0iA0C10pYbi0HUSEH1EOLtB+UMWU3wkc8QOCMWcgz7wze1w6QQ==",
+ "version": "6.0.0-beta.10",
+ "resolved": "https://registry.npmjs.org/electron/-/electron-6.0.0-beta.10.tgz",
+ "integrity": "sha512-eKDUv5ZZGjFE2ccBQzBpY6j3oT1NvnHGLcSoGXp6vCWkx+ZYjPyujwG3gW61FK7iL5FMKyg9IlhCOsIy4HEruw==",
"dev": true,
"requires": {
"@types/node": "^10.12.18",
diff --git a/package.json b/package.json
index f2119dd618..c5ae6cebca 100644
--- a/package.json
+++ b/package.json
@@ -75,7 +75,7 @@
},
"devDependencies": {
"devtron": "1.4.0",
- "electron": "6.0.0-beta.9",
+ "electron": "6.0.0-beta.10",
"electron-builder": "20.44.2",
"electron-compile": "6.4.4",
"electron-installer-debian": "2.0.0",
diff --git a/src/public/javascripts/services/tab_context.js b/src/public/javascripts/services/tab_context.js
index 9165ff0121..405005c087 100644
--- a/src/public/javascripts/services/tab_context.js
+++ b/src/public/javascripts/services/tab_context.js
@@ -67,12 +67,18 @@ class TabContext {
this.components = {};
this.$noteTitle.on('input', () => {
+ if (!this.note) {
+ return;
+ }
+
this.noteChanged();
- const title = this.$noteTitle.val();
+ this.note.title = this.$noteTitle.val();
+
+ this.tabRow.updateTab(this.$tab[0], {title: this.note.title});
+ treeService.setNoteTitle(this.noteId, this.note.title);
- this.tabRow.updateTab(this.$tab[0], {title});
- treeService.setNoteTitle(this.noteId, title);
+ this.setTitleBar();
});
if (utils.isDesktop()) {