Project

General

Profile

Actions

Defect #32899

open

Javascript error caused by tooltip

Added by Anonymous almost 5 years ago. Updated 21 days 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

Also available in: Atom PDF