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.