From a9ea00657ca69bced7763690fd418fbac5fbd453 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vanesa=20Smo=C4=BEakov=C3=A1?= Date: Sat, 23 May 2026 00:04:51 +0200 Subject: [PATCH 1/2] MID-10908 Fix tooltip lifecycle in search popovers Tooltips shown from searchable items in the More popover could blink or remain visible after the cursor left the trigger. On some platforms, multiple tooltip instances could stay open until the page was reloaded. Keep the original tooltip trigger reference when hiding delayed tooltips, prevent hover-opened tooltip overlays from interfering with the trigger, and dispose tooltip instances when the popover closes. --- .../src/frontend/js/midpoint-theme.js | 21 +++++++++++-------- release-notes.adoc | 1 + 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/gui/admin-gui/src/frontend/js/midpoint-theme.js b/gui/admin-gui/src/frontend/js/midpoint-theme.js index 03311f016bc..cefafc158c3 100644 --- a/gui/admin-gui/src/frontend/js/midpoint-theme.js +++ b/gui/admin-gui/src/frontend/js/midpoint-theme.js @@ -302,11 +302,11 @@ export default class MidPointTheme { if (parentMorePopup && parentMorePopup.length !== 0) { setTimeout(function() { isHovered = false; - checkHide($(this)); + checkHide($el); }, 300); } else { isHovered = false; - checkHide($(this)); + checkHide($el); } }); @@ -379,13 +379,13 @@ export default class MidPointTheme { $el.data("tooltipShowDelayTimer", setTimeout(() => { $el.tooltip("show"); $el.removeAttr("aria-describedby"); - }, 1000)); - - setTimeout(() => { - const $tooltip = $('.tooltip:visible').last(); - $tooltip.removeAttr('role'); + const $tooltip = $('.tooltip:visible').last() + .attr('id', tooltipId) + .removeAttr('role'); + if (!setFocus) { + $tooltip.css('pointer-events', 'none'); + } const $tooltipInner = $tooltip.find('.tooltip-inner'); - $tooltip.attr('id', tooltipId); $tooltipInner .attr('tabindex', '0') @@ -428,7 +428,7 @@ export default class MidPointTheme { $tooltipInner.focus(); lastTooltipTrigger = $el; } - }, 100); + }, 1000)); } }; @@ -1389,6 +1389,9 @@ export default class MidPointTheme { if (!show) { if (popup.is(':visible')) { + popup.find("[data-toggle='tooltip']").each(function () { + $(this).tooltip('hide').tooltip('dispose').removeAttr('data-tooltip-id aria-describedby'); + }); popup.fadeOut(200); ref.attr('aria-expanded', 'false'); ref.focus(); diff --git a/release-notes.adoc b/release-notes.adoc index 6c212cea90d..321483e652d 100644 --- a/release-notes.adoc +++ b/release-notes.adoc @@ -140,6 +140,7 @@ Overall, midPoint 4.10 opens up the world of identity management and governance * Fixed missing .zip extension when downloading tracing report files. See bug:MID-11096[] * Fixed resource wizard mapping property autocomplete to find partial matches regardless of letter case. See bug:MID-10415[] * Fixed missing input variable in resource activation existence mappings. See bug:MID-10905[] +* Fixed tooltip lifecycle in search popovers to prevent blinking, stuck, and duplicate tooltips. See bug:MID-10908[] === Releases Of Other Components From 8fa19bb3ada03c329af6889aa066347da4a40212 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vanesa=20Smo=C4=BEakov=C3=A1?= Date: Wed, 10 Jun 2026 23:11:42 +0200 Subject: [PATCH 2/2] MID-10908 Fix tooltip placement in search popover --- gui/admin-gui/src/frontend/js/midpoint-theme.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/gui/admin-gui/src/frontend/js/midpoint-theme.js b/gui/admin-gui/src/frontend/js/midpoint-theme.js index cefafc158c3..3289016794b 100644 --- a/gui/admin-gui/src/frontend/js/midpoint-theme.js +++ b/gui/admin-gui/src/frontend/js/midpoint-theme.js @@ -364,13 +364,21 @@ export default class MidPointTheme { const tooltipId = 'tooltip-' + Math.random().toString(16).substr(2, 6); $el.attr('data-tooltip-id', tooltipId); - $el.tooltip({ + const tooltipOptions = { html: true, title: $el.attr('data-tooltip-content') || '', whiteList: wl, container: container, trigger: 'manual' - }); + }; + + if ($el.closest('.search-popover').length !== 0) { + tooltipOptions.placement = 'left'; + tooltipOptions.boundary = 'window'; + tooltipOptions.offset = '0, 2'; + } + + $el.tooltip(tooltipOptions); // "tooltipShowDelayTimer" is used to prevent tooltip from showing when user quickly moves mouse // over multiple icons with tooltips or quickly tabs through them. Tooltip will be shown only for