Project

General

Profile

Actions

Defect #43358

open

Code block copy button icon appears gray instead of blue

Added by Katsuya HIDAKA 4 days ago. Updated about 10 hours ago.

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

0%

Estimated time:
Resolution:
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 4 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 4 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 about 10 hours ago

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

Updated by Go MAEDA about 10 hours ago

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

Also available in: Atom PDF