Defect #32899

Javascript error caused by tooltip

Added by taca tadocolo 9 months ago. Updated 6 months ago.

Status:ConfirmedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:UI
Target version:Candidate for next minor release
Resolution: Affected version:

Description

Improved tooltip in Redmine 4.1.0 ( #31441) causes a Javascript error on some (self-made) plugin pages using the "title" attribute.
This is caused by the absence of the tooltip() function in the "title" attribute. By inserting a judgment statement as follows, errors will not occured.

--- a/public/javascripts/application.js
+++ b/public/javascripts/application.js
@@ -998,13 +998,15 @@

 $(function () {
-    $('[title]').tooltip({
-        show: {
-          delay: 400
-        },
-        position: {
-          my: "center bottom-5",
-          at: "center top" 
-        }
-    });
+    if ($('[title]').tooltip !== undefined) {
+        $('[title]').tooltip({
+            show: {
+              delay: 400
+            },
+            position: {
+              my: "center bottom-5",
+              at: "center top" 
+            }
+        });
+    }
 });

32899-js-error.png (134 KB) Go MAEDA, 2020-04-20 11:02

History

#1 Updated by Go MAEDA 6 months ago

Could you give some examples of plugins that cause the problem?

#2 Updated by taca tadocolo 6 months ago

Try this forked plugin.
https://github.com/n0nel/Redmine-Monitoring-Controlling
(default branch: redmine4.1)
After installing, click "Monitoring & Controlling" tab, then javascript error will occur.

#3 Updated by Go MAEDA 6 months ago

  • File 32899-js-error.png added
  • Tracker changed from Patch to Defect
  • Status changed from New to Confirmed

#4 Updated by Go MAEDA 6 months ago

  • Target version set to Candidate for next minor release

Also available in: Atom PDF