mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 06:53:25 +00:00
left_sidebar: Fix tooltips not hidden on blur.
The elements which received focus didn't have tooltips attached to them, thus when blur was triggered on `a`, the tooltip didn't hide as it was not listening on it for the blur event. We move the toolip to `a` elements so that when focus and blur are triggered tippy is able to capture them.
This commit is contained in:
@@ -167,6 +167,16 @@ export function initialize(): void {
|
||||
if ($container.data("view-code") === user_settings.web_home_view) {
|
||||
$container.find(".views-tooltip-home-view-note").removeClass("hide");
|
||||
}
|
||||
|
||||
// Since the tooltip is attached the anchor tag which doesn't
|
||||
// include with of the ellipsis icon, we need to offset the
|
||||
// tooltip so that the tooltip is displayed to right of the
|
||||
// ellipsis icon.
|
||||
if (instance.reference.classList.contains("left-sidebar-navigation-label-container")) {
|
||||
instance.setProps({
|
||||
offset: [0, 40],
|
||||
});
|
||||
}
|
||||
},
|
||||
onHidden(instance) {
|
||||
instance.destroy();
|
||||
|
||||
Reference in New Issue
Block a user