Skip to content

Build your personal knowledge base with Trilium Notes

fix(server): calendar tooltip positioning (closes #5675)

Elian Doranf95082ccdb17
diff --git a/apps/client/src/widgets/buttons/right_dropdown_button.ts b/apps/client/src/widgets/buttons/right_dropdown_button.ts
index 6d896eae28..7c43f14af3 100644
--- a/apps/client/src/widgets/buttons/right_dropdown_button.ts
+++ b/apps/client/src/widgets/buttons/right_dropdown_button.ts
@@ -47,8 +47,9 @@ export default class RightDropdownButtonWidget extends BasicWidget {
}
});
- this.$tooltip = this.$widget.find(".tooltip-trigger").attr("title", this.title);
- this.tooltip = new Tooltip(this.$tooltip[0], {
+ this.$widget.attr("title", this.title);
+ this.tooltip = Tooltip.getOrCreateInstance(this.$widget[0], {
+ trigger: "hover",
placement: handleRightToLeftPlacement(this.settings.titlePlacement),
fallbackPlacements: [ handleRightToLeftPlacement(this.settings.titlePlacement) ]
});
@@ -56,9 +57,7 @@ export default class RightDropdownButtonWidget extends BasicWidget {
this.$widget
.find(".right-dropdown-button")
.addClass(this.iconClass)
- .on("click", () => this.tooltip.hide())
- .on("mouseenter", () => this.tooltip.show())
- .on("mouseleave", () => this.tooltip.hide());
+ .on("click", () => this.tooltip.hide());
this.$widget.on("show.bs.dropdown", async () => {
await this.dropdownShown();