Skip to content

Build your personal knowledge base with Trilium Notes

fix popups/tooltips not disappearing after loading new note, closes #1214

zadam6d095b725025
diff --git a/src/public/app/services/entrypoints.js b/src/public/app/services/entrypoints.js
index acfbc14e64..016b74cd63 100644
--- a/src/public/app/services/entrypoints.js
+++ b/src/public/app/services/entrypoints.js
@@ -219,4 +219,16 @@ export default class Entrypoints extends Component {
toastService.showMessage("Note executed");
}
+
+ hideAllTooltips() {
+ $(".tooltip").removeClass("show");
+ }
+
+ tabNoteSwitchedEvent() {
+ this.hideAllTooltips();
+ }
+
+ activeTabChangedEvent() {
+ this.hideAllTooltips();
+ }
}
diff --git a/src/public/app/services/main_tree_executors.js b/src/public/app/services/main_tree_executors.js
index 9a8306fad3..fdd5cd1075 100644
--- a/src/public/app/services/main_tree_executors.js
+++ b/src/public/app/services/main_tree_executors.js
@@ -3,7 +3,6 @@ import noteCreateService from "./note_create.js";
import treeService from "./tree.js";
import hoistedNoteService from "./hoisted_note.js";
import Component from "../widgets/component.js";
-import ws from "./ws.js";
/**
* This class contains command executors which logically belong to the NoteTree widget, but for better user experience
diff --git a/src/public/app/widgets/attribute_detail.js b/src/public/app/widgets/attribute_detail.js
index 167f8fe1a5..1fe1ad777d 100644
--- a/src/public/app/widgets/attribute_detail.js
+++ b/src/public/app/widgets/attribute_detail.js
@@ -215,7 +215,9 @@ const ATTR_HELP = {
export default class AttributeDetailWidget extends TabAwareWidget {
async refresh() {
- // this widget is not activated in a standard way
+ // switching note/tab should close the widget
+
+ this.hide();
}
doRender() {
diff --git a/src/public/app/widgets/note_tree.js b/src/public/app/widgets/note_tree.js
index 1d3c7231c1..9d9ab7e290 100644
--- a/src/public/app/widgets/note_tree.js
+++ b/src/public/app/widgets/note_tree.js
@@ -905,6 +905,7 @@ export default class NoteTreeWidget extends TabAwareWidget {
async refresh() {
this.toggleInt(this.isEnabled());
+ this.$treeSettingsPopup.hide();
this.activityDetected();