From 3b3d028cab7d93f2e6af6ed94529f6b009e7f5f5 Mon Sep 17 00:00:00 2001 From: David Sheldrick Date: Thu, 24 Oct 2024 11:05:13 +0100 Subject: [PATCH] [botcom] fix inline renaming (#4769) Clicking the name to rename was broken ### Change type - [x] `other` --- .../src/tla/components/TlaEditor/TlaEditorTopLeftPanel.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/dotcom/client/src/tla/components/TlaEditor/TlaEditorTopLeftPanel.tsx b/apps/dotcom/client/src/tla/components/TlaEditor/TlaEditorTopLeftPanel.tsx index e73501af7474..96d9149018cb 100644 --- a/apps/dotcom/client/src/tla/components/TlaEditor/TlaEditorTopLeftPanel.tsx +++ b/apps/dotcom/client/src/tla/components/TlaEditor/TlaEditorTopLeftPanel.tsx @@ -151,9 +151,9 @@ function TlaFileNameEditor({ ) useEffect(() => { - if (isRenaming !== undefined && isRenaming !== isEditing) { + if (isRenaming && !isEditing) { // Wait a tick, otherwise the blur event immediately exits the input. - setTimeout(() => setIsEditing(isRenaming), 0) + setTimeout(() => setIsEditing(true), 0) } }, [isRenaming, isEditing])