From 76054c6db77efddc941bea18b261b44832afaa7e Mon Sep 17 00:00:00 2001 From: Adeniji Adekunle James Date: Wed, 13 Aug 2025 23:34:11 +0100 Subject: [PATCH] fix(ui): prevent content click from toggling accordion and improve UX with cursor-text in Codeblock (#930) Hovering over the code block previously showed a pointer cursor, and clicking inside would collapse/expand the accordion. This PR updates the DyadWrite component to use `cursor-text` and adds `e.stopPropagation()` so clicks inside the code block no longer toggle the accordion, making it behave like other AI tools and improving user friendliness. Before https://github.com/user-attachments/assets/7b6983fd-91a0-4f30-9337-d444cbfcc110 After https://github.com/user-attachments/assets/07d0d765-7206-4552-b0b4-2665d87df4a1 --- src/components/chat/DyadWrite.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/chat/DyadWrite.tsx b/src/components/chat/DyadWrite.tsx index fb596c2..49dc09f 100644 --- a/src/components/chat/DyadWrite.tsx +++ b/src/components/chat/DyadWrite.tsx @@ -94,7 +94,10 @@ export const DyadWrite: React.FC = ({ )} {isContentVisible && ( -
+
e.stopPropagation()} + > {children}