mirror of
https://github.com/zadam/trilium.git
synced 2025-11-11 07:45:51 +01:00
hide tooltip after clicking on a button, fixes #2228
This commit is contained in:
@@ -26,9 +26,17 @@ export default class ButtonWidget extends NoteContextAwareWidget {
|
||||
this.$widget = $(TPL);
|
||||
|
||||
if (this.settings.onClick) {
|
||||
this.$widget.on("click", () => this.settings.onClick(this));
|
||||
this.$widget.on("click", () => {
|
||||
this.$widget.tooltip("hide");
|
||||
|
||||
this.settings.onClick(this)
|
||||
});
|
||||
} else {
|
||||
this.$widget.on("click", () => this.triggerCommand(this.settings.command));
|
||||
this.$widget.on("click", () => {
|
||||
this.$widget.tooltip("hide");
|
||||
|
||||
this.triggerCommand(this.settings.command)
|
||||
});
|
||||
}
|
||||
|
||||
this.$widget.attr("data-placement", this.settings.titlePlacement);
|
||||
|
||||
Reference in New Issue
Block a user