From 7437149b6d1e8ba4f8004ee1c621d4abc827fbaa Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 19 Feb 2026 21:39:08 +0000 Subject: [PATCH] Fix: Prevent line numbers from being copied in code blocks Add CSS rule with vendor prefixes for user-select: none targeting the react-syntax-highlighter-line-number class. This ensures line numbers are excluded from text selection when users manually highlight code. Resolves KNO-11736 Co-authored-by: Matt Kufchak --- styles/global.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/styles/global.css b/styles/global.css index 1aa135bc2..644506f78 100644 --- a/styles/global.css +++ b/styles/global.css @@ -7,6 +7,14 @@ @import "@telegraph/input/default.css"; @import "@telegraph/menu/default.css"; +/* Prevent line numbers from being copied when selecting code */ +.react-syntax-highlighter-line-number { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + .tgraph-content { color: var(--tgph-gray-12) !important; }