Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(launch_bar/calendar): tooltip showing over the calendar dropdown
Elian Doran3c61626370c8
diff --git a/apps/client/src/stylesheets/style.css b/apps/client/src/stylesheets/style.cssindex b0a963595e..24d74a98d1 100644--- a/apps/client/src/stylesheets/style.css+++ b/apps/client/src/stylesheets/style.css@@ -706,11 +706,6 @@ table.promoted-attributes-in-tooltip th {z-index: 32767 !important;}-.tooltip-trigger {- background: transparent;- pointer-events: none;-}-.bs-tooltip-bottom .tooltip-arrow::before {border-bottom-color: var(--main-border-color) !important;}@@ -1379,6 +1374,20 @@ body:not(.mobile) #launcher-pane.horizontal .dropdown-submenu > .dropdown-menu {flex-shrink: 0;}+.right-dropdown-widget .right-dropdown-button {+ position: relative;+}++.tooltip-trigger {+ background: transparent;+ pointer-events: none;+ position: absolute;+ top: 0;+ left: 0;+ right: 0;+ bottom: 0;+}+#launcher-pane.horizontal .right-dropdown-widget {width: 53px;}diff --git a/apps/client/src/widgets/buttons/right_dropdown_button.ts b/apps/client/src/widgets/buttons/right_dropdown_button.tsindex 4b3505bc97..45915c2549 100644--- a/apps/client/src/widgets/buttons/right_dropdown_button.ts+++ b/apps/client/src/widgets/buttons/right_dropdown_button.ts@@ -7,9 +7,9 @@ const TPL = /*html*/`<div class="dropdown right-dropdown-widget"><button type="button" data-bs-toggle="dropdown"aria-haspopup="true" aria-expanded="false"- class="bx right-dropdown-button launcher-button"></button>-- <div class="tooltip-trigger"></div>+ class="bx right-dropdown-button launcher-button">+ <div class="tooltip-trigger"></div>+ </button><div class="dropdown-menu"></div></div>@@ -52,9 +52,8 @@ export default class RightDropdownButtonWidget extends BasicWidget {}});- this.$widget.attr("title", this.title);- this.tooltip = Tooltip.getOrCreateInstance(this.$widget[0], {- trigger: "hover",+ this.$tooltip = this.$widget.find(".tooltip-trigger").attr("title", this.title);+ this.tooltip = new Tooltip(this.$tooltip[0], {placement: handleRightToLeftPlacement(this.settings.titlePlacement),fallbackPlacements: [ handleRightToLeftPlacement(this.settings.titlePlacement) ]});@@ -62,7 +61,9 @@ export default class RightDropdownButtonWidget extends BasicWidget {this.$widget.find(".right-dropdown-button").addClass(this.iconClass)- .on("click", () => this.tooltip.hide());+ .on("click", () => this.tooltip.hide())+ .on("mouseenter", () => this.tooltip.show())+ .on("mouseleave", () => this.tooltip.hide());this.$widget.on("show.bs.dropdown", async () => {await this.dropdownShown();