From 40b3f548988fc27731aa6e4158dfe40bda365cab Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 23 May 2025 13:09:33 +0000 Subject: [PATCH 1/2] Initial plan for issue From e919c5146be04690bd1a8117b27b439101b7c99b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 23 May 2025 13:20:12 +0000 Subject: [PATCH 2/2] Fix Monaco Editor text selection not visible in High Contrast Mode Co-authored-by: lei9444 <39758135+lei9444@users.noreply.github.com> --- src/Monaco/index.html | 12 ++++++++++++ .../Assets/RegistryPreview/index.html | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/src/Monaco/index.html b/src/Monaco/index.html index 54f7524225bf..fd17ceab5755 100644 --- a/src/Monaco/index.html +++ b/src/Monaco/index.html @@ -71,6 +71,18 @@ /*Hides alert box */ display: none !important } + + /* Fix for text selection in High Contrast Mode */ + @media (forced-colors: active) { + .monaco-editor .focused .selected-text { + background-color: Highlight !important; + color: HighlightText !important; + } + .monaco-editor .selected-text { + background-color: Highlight !important; + color: HighlightText !important; + } + } diff --git a/src/modules/registrypreview/RegistryPreviewUILib/Assets/RegistryPreview/index.html b/src/modules/registrypreview/RegistryPreviewUILib/Assets/RegistryPreview/index.html index 95ae2d3d4e79..76b8157f5c55 100644 --- a/src/modules/registrypreview/RegistryPreviewUILib/Assets/RegistryPreview/index.html +++ b/src/modules/registrypreview/RegistryPreviewUILib/Assets/RegistryPreview/index.html @@ -26,6 +26,18 @@ /*Hides alert box */ display: none !important } + + /* Fix for text selection in High Contrast Mode */ + @media (forced-colors: active) { + .monaco-editor .focused .selected-text { + background-color: Highlight !important; + color: HighlightText !important; + } + .monaco-editor .selected-text { + background-color: Highlight !important; + color: HighlightText !important; + } + }