From 6de0f7593143335cb62bc3ab76f7a55212d7bbd9 Mon Sep 17 00:00:00 2001 From: zadam Date: Sun, 15 Mar 2020 18:57:03 +0100 Subject: [PATCH] fix switching notes in the passive tabs --- src/public/javascripts/widgets/note_tree.js | 3 ++- src/public/javascripts/widgets/tab_aware_widget.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/public/javascripts/widgets/note_tree.js b/src/public/javascripts/widgets/note_tree.js index 75ced6fae..513856712 100644 --- a/src/public/javascripts/widgets/note_tree.js +++ b/src/public/javascripts/widgets/note_tree.js @@ -418,7 +418,8 @@ export default class NoteTreeWidget extends TabAwareWidget { await this.tree.reload(notes); } - collapseTreeCommand() { this.collapseTree(); } + // must be event since it's triggered from outside the tree + collapseTreeEvent() { this.collapseTree(); } isEnabled() { return !!this.tabContext; diff --git a/src/public/javascripts/widgets/tab_aware_widget.js b/src/public/javascripts/widgets/tab_aware_widget.js index 15a52e9be..cf2375293 100644 --- a/src/public/javascripts/widgets/tab_aware_widget.js +++ b/src/public/javascripts/widgets/tab_aware_widget.js @@ -48,7 +48,7 @@ export default class TabAwareWidget extends BasicWidget { async tabNoteSwitchedEvent({tabContext, notePath}) { // if notePath does not match then the tabContext has been switched to another note in the mean time - if (tabContext.isActive() && tabContext.notePath === notePath) { + if (tabContext.notePath === notePath) { await this.noteSwitched(); } }