From 3889963beb880f3f9a8719a27cee191cd63ed043 Mon Sep 17 00:00:00 2001
From: Moritz Strohm <strohm@data-quest.de>
Date: Mon, 22 Apr 2024 12:23:35 +0200
Subject: [PATCH] added another possibility for tooltip content

---
 resources/assets/javascripts/bootstrap/tooltip.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/resources/assets/javascripts/bootstrap/tooltip.js b/resources/assets/javascripts/bootstrap/tooltip.js
index 564d8db2f52..5a41f2f41db 100644
--- a/resources/assets/javascripts/bootstrap/tooltip.js
+++ b/resources/assets/javascripts/bootstrap/tooltip.js
@@ -24,7 +24,11 @@ $(document).on('mouseenter mouseleave focusin focusout', '[data-tooltip],.toolti
         // If tooltip has not yet been created (first hover), obtain it's
         // contents and create the actual tooltip object.
         if (!data.tooltip || !$.isPlainObject(data.tooltip)) {
+            let describing_element = $('#' + $(this).attr('aria-describedby'));
             content = $('<div/>').text(data.tooltip || $(this).attr('title')).html();
+            if (!content && describing_element) {
+                content = $(describing_element).html();
+            }
         } else if (data.tooltip.html !== undefined) {
             content = data.tooltip.html;
         } else if (data.tooltip.text !== undefined) {
-- 
GitLab