From b68bdc5005236f88c9301abcacfa634d6e646ba6 Mon Sep 17 00:00:00 2001 From: zadam Date: Mon, 5 Jul 2021 08:59:36 +0200 Subject: [PATCH] hide global menu tooltip upon click --- src/public/app/widgets/buttons/button_widget.js | 3 ++- src/public/app/widgets/buttons/global_menu.js | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/public/app/widgets/buttons/button_widget.js b/src/public/app/widgets/buttons/button_widget.js index 663235531..0426c8758 100644 --- a/src/public/app/widgets/buttons/button_widget.js +++ b/src/public/app/widgets/buttons/button_widget.js @@ -30,7 +30,8 @@ export default class ButtonWidget extends NoteContextAwareWidget { this.$widget.tooltip({ html: true, - title: () => this.settings.title + title: () => this.settings.title, + trigger: "hover" }); super.doRender(); diff --git a/src/public/app/widgets/buttons/global_menu.js b/src/public/app/widgets/buttons/global_menu.js index a205a6d06..9607a8375 100644 --- a/src/public/app/widgets/buttons/global_menu.js +++ b/src/public/app/widgets/buttons/global_menu.js @@ -96,7 +96,13 @@ export default class GlobalMenuWidget extends BasicWidget { doRender() { 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', () => import("../../dialogs/about.js").then(d => d.showDialog()));