mirror of
https://github.com/zadam/trilium.git
synced 2025-11-30 04:24:24 +01:00
fix(launch_bar/calendar): tooltip showing over the calendar dropdown
This commit is contained in:
parent
351fe5848f
commit
3c61626370
@ -706,11 +706,6 @@ table.promoted-attributes-in-tooltip th {
|
|||||||
z-index: 32767 !important;
|
z-index: 32767 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tooltip-trigger {
|
|
||||||
background: transparent;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bs-tooltip-bottom .tooltip-arrow::before {
|
.bs-tooltip-bottom .tooltip-arrow::before {
|
||||||
border-bottom-color: var(--main-border-color) !important;
|
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;
|
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 {
|
#launcher-pane.horizontal .right-dropdown-widget {
|
||||||
width: 53px;
|
width: 53px;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,9 +7,9 @@ const TPL = /*html*/`
|
|||||||
<div class="dropdown right-dropdown-widget">
|
<div class="dropdown right-dropdown-widget">
|
||||||
<button type="button" data-bs-toggle="dropdown"
|
<button type="button" data-bs-toggle="dropdown"
|
||||||
aria-haspopup="true" aria-expanded="false"
|
aria-haspopup="true" aria-expanded="false"
|
||||||
class="bx right-dropdown-button launcher-button"></button>
|
class="bx right-dropdown-button launcher-button">
|
||||||
|
<div class="tooltip-trigger"></div>
|
||||||
<div class="tooltip-trigger"></div>
|
</button>
|
||||||
|
|
||||||
<div class="dropdown-menu"></div>
|
<div class="dropdown-menu"></div>
|
||||||
</div>
|
</div>
|
||||||
@ -52,9 +52,8 @@ export default class RightDropdownButtonWidget extends BasicWidget {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$widget.attr("title", this.title);
|
this.$tooltip = this.$widget.find(".tooltip-trigger").attr("title", this.title);
|
||||||
this.tooltip = Tooltip.getOrCreateInstance(this.$widget[0], {
|
this.tooltip = new Tooltip(this.$tooltip[0], {
|
||||||
trigger: "hover",
|
|
||||||
placement: handleRightToLeftPlacement(this.settings.titlePlacement),
|
placement: handleRightToLeftPlacement(this.settings.titlePlacement),
|
||||||
fallbackPlacements: [ handleRightToLeftPlacement(this.settings.titlePlacement) ]
|
fallbackPlacements: [ handleRightToLeftPlacement(this.settings.titlePlacement) ]
|
||||||
});
|
});
|
||||||
@ -62,7 +61,9 @@ export default class RightDropdownButtonWidget extends BasicWidget {
|
|||||||
this.$widget
|
this.$widget
|
||||||
.find(".right-dropdown-button")
|
.find(".right-dropdown-button")
|
||||||
.addClass(this.iconClass)
|
.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 () => {
|
this.$widget.on("show.bs.dropdown", async () => {
|
||||||
await this.dropdownShown();
|
await this.dropdownShown();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user