hide global menu tooltip upon click

This commit is contained in:
zadam 2021-07-05 08:59:36 +02:00
parent 9e77a424a4
commit b68bdc5005
2 changed files with 9 additions and 2 deletions

View file

@ -30,7 +30,8 @@ export default class ButtonWidget extends NoteContextAwareWidget {
this.$widget.tooltip({ this.$widget.tooltip({
html: true, html: true,
title: () => this.settings.title title: () => this.settings.title,
trigger: "hover"
}); });
super.doRender(); super.doRender();

View file

@ -96,7 +96,13 @@ export default class GlobalMenuWidget extends BasicWidget {
doRender() { doRender() {
this.$widget = $(TPL); this.$widget = $(TPL);
this.$widget.find(".global-menu-button").tooltip(); const $button = this.$widget.find(".global-menu-button");
$button.tooltip({
trigger: "hover"
});
$button.on("click", () => $button.tooltip("hide"));
this.$widget.find(".show-about-dialog-button").on('click', this.$widget.find(".show-about-dialog-button").on('click',
() => import("../../dialogs/about.js").then(d => d.showDialog())); () => import("../../dialogs/about.js").then(d => d.showDialog()));