From ba761a0d1e75dac9090f58848bf1f0f10d855519 Mon Sep 17 00:00:00 2001 From: "Kai (Tam Nhu) Tran" <61256810+kaitranntt@users.noreply.github.com> Date: Mon, 11 May 2026 21:58:55 -0400 Subject: [PATCH] fix(ui): wrap codex config highlight editor (#1217) --- ui/src/components/shared/code-editor.tsx | 28 +++++++++++-------- .../unit/components/ui/code-editor.test.tsx | 14 +++++++--- 2 files changed, 26 insertions(+), 16 deletions(-) diff --git a/ui/src/components/shared/code-editor.tsx b/ui/src/components/shared/code-editor.tsx index 6454828b..715a62d4 100644 --- a/ui/src/components/shared/code-editor.tsx +++ b/ui/src/components/shared/code-editor.tsx @@ -196,8 +196,8 @@ export function CodeEditor({ const layer = highlightLayerRef.current; if (!layer) return; - const { scrollLeft, scrollTop } = event.currentTarget; - layer.style.transform = `translate(${-scrollLeft}px, ${-scrollTop}px)`; + const { scrollTop } = event.currentTarget; + layer.style.transform = `translateY(${-scrollTop}px)`; }, []); return ( @@ -218,12 +218,15 @@ export function CodeEditor({ data-slot="code-editor-surface" >
{exactText ? ( // Exact mode keeps the native textarea as the editable/copyable source of truth while - // rendering Prism colors behind it with the same non-wrapping layout contract. + // rendering Prism colors behind it with the same soft-wrap layout contract.