Project

General

Profile

Actions

Defect #32899

open

Javascript error caused by tooltip

Added by Anonymous almost 5 years ago. Updated about 2 months ago.

Status:
Confirmed
Priority:
Normal
Assignee:
-
Category:
UI
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
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" 
+            }
+        });
+    }
 });


Files

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

Updated by Go MAEDA over 4 years ago

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

Actions #2

Updated by Anonymous over 4 years 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.

Actions #3

Updated by Go MAEDA over 4 years ago

Actions #4

Updated by Go MAEDA over 4 years ago

  • Target version set to Candidate for next minor release
Actions #5

Updated by Go MAEDA 12 months ago

  • Target version changed from Candidate for next minor release to 6.0.0
Actions #6

Updated by Go MAEDA about 2 months ago

  • Target version changed from 6.0.0 to 6.1.0
Actions

Also available in: Atom PDF