From 9beb2c1936682d379500aaba4b98eb04c312f4bb Mon Sep 17 00:00:00 2001 From: Vadym Samoilenko Date: Sat, 14 Mar 2026 23:12:32 +0000 Subject: [PATCH] Fix Studio textarea focus loss on every keystroke MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaced inner Textarea component (defined inside StudioCustomizeModal) with a plain renderTextarea() function called directly — prevents React from unmounting/remounting the textarea on each re-render. Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/app/notebooks/[id]/page.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/frontend/src/app/notebooks/[id]/page.tsx b/frontend/src/app/notebooks/[id]/page.tsx index d063492..0b17947 100644 --- a/frontend/src/app/notebooks/[id]/page.tsx +++ b/frontend/src/app/notebooks/[id]/page.tsx @@ -1618,7 +1618,7 @@ function StudioCustomizeModal({ type, opts, isPending, onChange, onGenerate, onC ); - const Textarea = ({ field, placeholder }: { field: string; placeholder: string }) => ( + const renderTextarea = (field: string, placeholder: string) => (