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

This commit is contained in:
zadam 2020-09-05 21:51:00 +02:00
parent ceb762e56b
commit 6d095b7250
4 changed files with 16 additions and 2 deletions

View File

@ -219,4 +219,16 @@ export default class Entrypoints extends Component {
toastService.showMessage("Note executed");
}
hideAllTooltips() {
$(".tooltip").removeClass("show");
}
tabNoteSwitchedEvent() {
this.hideAllTooltips();
}
activeTabChangedEvent() {
this.hideAllTooltips();
}
}

View File

@ -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

View File

@ -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() {

View File

@ -905,6 +905,7 @@ export default class NoteTreeWidget extends TabAwareWidget {
async refresh() {
this.toggleInt(this.isEnabled());
this.$treeSettingsPopup.hide();
this.activityDetected();