mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
fix setting the title bar when switching note
This commit is contained in:
parent
373ec4ac50
commit
8d3262d232
@ -553,7 +553,13 @@ class NoteDetailRelationMap {
|
||||
getZoom() {
|
||||
const matrixRegex = /matrix\((-?\d*\.?\d+),\s*0,\s*0,\s*-?\d*\.?\d+,\s*-?\d*\.?\d+,\s*-?\d*\.?\d+\)/;
|
||||
|
||||
const matches = this.$relationMapContainer.css('transform').match(matrixRegex);
|
||||
const transform = this.$relationMapContainer.css('transform');
|
||||
|
||||
const matches = transform.match(matrixRegex);
|
||||
|
||||
if (!matches) {
|
||||
throw new Error("Cannot match transform: " + transform);
|
||||
}
|
||||
|
||||
return matches[1];
|
||||
}
|
||||
|
@ -101,6 +101,8 @@ class TabContext {
|
||||
|
||||
this.setCurrentNotePathToHash();
|
||||
|
||||
this.setTitleBar();
|
||||
|
||||
setTimeout(async () => {
|
||||
// we include the note into recent list only if the user stayed on the note at least 5 seconds
|
||||
if (notePath && notePath === this.notePath) {
|
||||
@ -123,6 +125,13 @@ class TabContext {
|
||||
show() {
|
||||
this.$tabContent.show();
|
||||
this.setCurrentNotePathToHash();
|
||||
this.setTitleBar();
|
||||
}
|
||||
|
||||
setTitleBar() {
|
||||
if (!this.$tabContent.is(":visible")) {
|
||||
return;
|
||||
}
|
||||
|
||||
document.title = "Trilium Notes";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user