From d6e1df3a87a0140422fb9135bcac3e7d1132dfeb Mon Sep 17 00:00:00 2001 From: Adeniji Adekunle James Date: Sat, 6 Sep 2025 07:09:46 +0100 Subject: [PATCH] fix(ui): turbo edit - prevent code editor content click from toggling accordion (#1201) Hovering over the turbo edit code block previously showed a pointer cursor, and clicking inside would collapse/expand the accordion. This PR updates the DyadEdit component to use cursor-text and adds e.stopPropagation() so clicks inside the code block no longer toggle the accordion. https://github.com/user-attachments/assets/1b23be66-6d8f-4e4b-a390-d59f9a2bcee8 --- ## Summary by cubic Prevented the Turbo Edit accordion from toggling when clicking inside the code block and updated the cursor to text to signal editing. - **Bug Fixes** - Stop click propagation inside the code block to avoid accordion toggle. - Apply cursor-text on the code container for proper text-selection affordance. --- src/components/chat/DyadEdit.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/chat/DyadEdit.tsx b/src/components/chat/DyadEdit.tsx index 4eb9c5a..094102f 100644 --- a/src/components/chat/DyadEdit.tsx +++ b/src/components/chat/DyadEdit.tsx @@ -99,7 +99,10 @@ export const DyadEdit: React.FC = ({ )} {isContentVisible && ( -
+
e.stopPropagation()} + > {children}