Project

General

Profile

Actions

Defect #39795

closed

Fix improper error highlighting for description field in issue form

Added by Mizuki ISHIKAWA 5 months ago. Updated 4 months ago.

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

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

There is a feature that highlights input fields with a red border when a validation error occurs. An issue was identified with the 'Description' field, set as a mandatory input. When a validation error is triggered in this field, the red border is incorrectly positioned.

This problem does not occur with 'Long text' format custom fields. The notable difference is that the 'Description' field contains a 'span#issue_description_and_toolbar' element, which causes the red border to be displayed around the span tag, unlike in custom fields.


Files

clipboard-202312081436-va2fa.png (289 KB) clipboard-202312081436-va2fa.png Mizuki ISHIKAWA, 2023-12-08 06:36
clipboard-202312081437-h8wy5.png (295 KB) clipboard-202312081437-h8wy5.png Mizuki ISHIKAWA, 2023-12-08 06:37
clipboard-202312081438-exxmp.png (295 KB) clipboard-202312081438-exxmp.png Mizuki ISHIKAWA, 2023-12-08 06:38
fix-39795.patch (1.68 KB) fix-39795.patch Mizuki ISHIKAWA, 2023-12-08 07:21
Actions #1

Updated by Mizuki ISHIKAWA 5 months ago

The issue can be resolved by modifying the CSS as follows:

diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index b92a34d68..3ef6e6180 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -905,7 +905,7 @@ label.block {
   color: #bb0000;
 }

-.tabular label.error + * {
+.tabular label.error + *:not(span), .tabular label.error + span div.jstBlock {
   border: 1px solid #bb0000;
 }

Screen after fixed:

Actions #2

Updated by Mizuki ISHIKAWA 5 months ago

The changes in #note-1 were not completely resolved, so I am attaching the patch again.

Actions #3

Updated by Go MAEDA 5 months ago

  • Target version set to 5.0.8

Setting the target version to 5.0.8.

Actions #4

Updated by Go MAEDA 4 months ago

  • Subject changed from Description field error highlighting misalignment on validation failure to Fix improper error highlighting for description field in issue form
  • Target version changed from 5.0.8 to 6.0.0
Actions #5

Updated by Go MAEDA 4 months ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the fix in r22545. Thank you.

Actions

Also available in: Atom PDF