From c04cf276b747db09b50c4207379dd46bd8837928 Mon Sep 17 00:00:00 2001 From: nathan Date: Thu, 18 Apr 2024 11:51:31 -0600 Subject: [PATCH] Calendar: Adjust event tooltips to avoid scroll issues in Firefox --- calendar/js/et2_widget_event.ts | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/calendar/js/et2_widget_event.ts b/calendar/js/et2_widget_event.ts index 383135b4d2..0427fdab7a 100644 --- a/calendar/js/et2_widget_event.ts +++ b/calendar/js/et2_widget_event.ts @@ -98,17 +98,20 @@ export class et2_calendar_event extends et2_valueWidget implements et2_IDetached // Bind actions on first mouseover for faster creation if (event._need_actions_linked) { - event._copy_parent_actions(); + event._copy_parent_actions(); } // Tooltip if (!event._tooltipElem) { - event.options.statustext_html = true; - event.set_statustext(event._tooltip()); - if (event.statustext) - { - return event.div.trigger('mouseenter'); - } + event.options.statustext_html = true; + event.set_statustext(event._tooltip()); + // Rebind with options + event.egw().tooltipUnbind(event._tooltipElem); + event.egw().tooltipBind(event.getTooltipElement(), event.statustext, event.options.statustext_html, {hideonhover: false}); + if(event.statustext) + { + return jQuery(event.getTooltipElement()).trigger('mouseenter'); + } } // Hacky to remove egw's tooltip border and let the mouse in window.setTimeout(function () @@ -121,17 +124,12 @@ export class et2_calendar_event extends et2_valueWidget implements et2_IDetached { event.div.off('mouseleave.tooltip'); } - - jQuery('body.egw_tooltip').remove(); - jQuery('body').append(this); jQuery(this).stop(true).fadeTo(400, 1) .on('mouseleave', function() { jQuery(this).fadeOut('400', function() { - jQuery(this).remove(); - // Set up to work again - event.set_statustext(event._tooltip()); + event.egw().tooltipCancel(); }); }); });