Project

General

Profile

Actions

Defect #43358

closed

Code block copy button icon appears gray instead of blue

Added by Katsuya HIDAKA 8 days ago. Updated 4 days ago.

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

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

This issue seems related to #43280.


Files


Related issues

Related to Redmine - Feature #43280: Improve visual distinction of link presence in SVG iconsClosedGo MAEDA

Actions
Actions #1

Updated by Katsuya HIDAKA 8 days ago

I'm attaching the fix patch. In patch 0002, the selectors that receive --oc-blue-9 are switched from a.icon:link / a.icon:visited to plain a.icon.

If that change raises concerns, the issue can also be resolved by simply adding href="#" to the code block copy button as shown below.

diff --git a/app/assets/javascripts/application-legacy.js b/app/assets/javascripts/application-legacy.js
index 6bd315721..7bfddd1e1 100644
--- a/app/assets/javascripts/application-legacy.js
+++ b/app/assets/javascripts/application-legacy.js
@@ -689,6 +689,7 @@ function setupCopyButtonsToPreElements() {

     const copyButton = document.createElement("a");
     copyButton.title = rm.I18n.buttonCopy;
+    copyButton.href = "#";
     copyButton.classList.add("copy-pre-content-link", "icon-only");
     copyButton.append(createSVGIcon("copy-pre-content"));

Patch 0001 is just the commit that improves the CSS readability.

Actions #2

Updated by Katsuya HIDAKA 8 days ago

The icon doesn't appear blue because the copy button lacks an href attribute, so the a.icon:link selector never matches.

Actions #3

Updated by Go MAEDA 4 days ago

  • Related to Feature #43280: Improve visual distinction of link presence in SVG icons added
Actions #4

Updated by Go MAEDA 4 days ago

  • Status changed from New to Confirmed
  • Assignee set to Go MAEDA
Actions #5

Updated by Go MAEDA 4 days ago

  • Status changed from Confirmed to Closed
  • Resolution set to Fixed

Committed the fix as part of #43280 in r24054 and r24055, and merged them into 6.1-stable branch in r24056. Thank you.

Actions

Also available in: Atom PDF