Defect #34834

Line breaks in the description field of custom fields are ignored

Added by Go MAEDA 5 months ago. Updated 4 months ago.

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

0%

Category:UI
Target version:-
Resolution: Affected version:4.1.0

Description

The text in the description field of a custom field is displayed as a tooltip. In Redmine 4.1, all line breaks in the descriptions are ignored when showing a tooltip.

Redmine 4.1:

Redmine 4.0:

tooltip-4_1.png (28.3 KB) Go MAEDA, 2021-03-04 07:57

tooltip-4_0.png (36.9 KB) Go MAEDA, 2021-03-04 07:57

cf-description.png (38 KB) Go MAEDA, 2021-03-04 07:58


Related issues

Related to Redmine - Patch #31441: Show elements titles using jQuery UI tooltips Closed

History

#1 Updated by Go MAEDA 5 months ago

  • Related to Patch #31441: Show elements titles using jQuery UI tooltips added

#2 Updated by Yuuki NARA 4 months ago

By specifying content instead of title in tooltip, it was possible to reflect including line breaks.
I'm not used to JQuely, so I would appreciate it if you could fix any problems.

public/javascripts/application.js

$(function () {
  $("[title]:not(.no-tooltip)").tooltip({
+    content: function() {
+      return $(title)
+    },
    show: {
      delay: 400
    },
    position: {
      my: "center bottom-5",
      at: "center top" 
    }
  });
});

Also available in: Atom PDF