Project

General

Profile

Actions

Defect #34834

closed

Line breaks in the description of a custom field are ignored in a tooltip

Added by Go MAEDA almost 4 years ago. Updated about 3 years ago.

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

0%

Estimated time:
Resolution:
Fixed
Affected version:

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:


Files

tooltip-4_1.png (28.3 KB) tooltip-4_1.png Go MAEDA, 2021-03-04 07:57
tooltip-4_0.png (36.9 KB) tooltip-4_0.png Go MAEDA, 2021-03-04 07:57
cf-description.png (38 KB) cf-description.png Go MAEDA, 2021-03-04 07:58
tooltip-after-patching.png (33.9 KB) tooltip-after-patching.png Yuichi HARADA, 2021-09-09 02:48
34834.patch (442 Bytes) 34834.patch Yuichi HARADA, 2021-09-09 02:48

Related issues

Related to Redmine - Patch #31441: Show elements titles using jQuery UI tooltipsClosedGo MAEDA

Actions
Actions #1

Updated by Go MAEDA almost 4 years ago

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

Updated by Yuuki NARA almost 4 years 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" 
    }
  });
});

Actions #3

Updated by Yuichi HARADA over 3 years ago

Line breaks will be reflected in a tooltip by using the following patch.

diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index 9f6b4dc3d7..791ef4c23d 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -1493,7 +1493,8 @@ td.gantt_selected_column .gantt_hdr,.gantt_selected_column_container {
   color: #fff;
   border-radius: 3px;
   border: 0;
-  box-shadow: none
+  box-shadow: none;
+  white-space: pre-wrap;
 }

 /***** Icons *****/

Redmine-trunk: (r21217)

Actions #4

Updated by Go MAEDA about 3 years ago

  • Target version set to 4.1.5

Setting the target version to 4.1.5.

Actions #5

Updated by Go MAEDA about 3 years ago

  • Subject changed from Line breaks in the description field of custom fields are ignored to Line breaks in the description of a custom field are ignored in a tooltip
  • Status changed from New to Resolved
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch. Thank you.

Actions #6

Updated by Go MAEDA about 3 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF