From 1c7f0a50aac383a26888e291cf1036f92592a1d3 Mon Sep 17 00:00:00 2001 From: Sam Pennington <56024559+sampennington@users.noreply.github.com> Date: Sun, 24 May 2026 11:20:25 +0100 Subject: [PATCH] fix(code): select task title text when entering rename mode Both the sidebar inline rename and the task detail header rename were placing the cursor at the end of the existing title, so typing appended instead of replacing. Select the full value on focus so typing immediately overwrites the old name. Generated-By: PostHog Code Task-Id: 357e137a-fd55-40f3-8c4e-ea216cb64c51 --- .../src/renderer/features/sidebar/components/items/TaskItem.tsx | 2 +- .../features/task-detail/components/HeaderTitleEditor.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/code/src/renderer/features/sidebar/components/items/TaskItem.tsx b/apps/code/src/renderer/features/sidebar/components/items/TaskItem.tsx index a5ee2a5b4..2d9e6dc51 100644 --- a/apps/code/src/renderer/features/sidebar/components/items/TaskItem.tsx +++ b/apps/code/src/renderer/features/sidebar/components/items/TaskItem.tsx @@ -232,7 +232,7 @@ function InlineEditInput({ const input = inputRef.current; if (input) { input.focus(); - input.setSelectionRange(input.value.length, input.value.length); + input.select(); } }, []); diff --git a/apps/code/src/renderer/features/task-detail/components/HeaderTitleEditor.tsx b/apps/code/src/renderer/features/task-detail/components/HeaderTitleEditor.tsx index bf87c099d..51d425fd8 100644 --- a/apps/code/src/renderer/features/task-detail/components/HeaderTitleEditor.tsx +++ b/apps/code/src/renderer/features/task-detail/components/HeaderTitleEditor.tsx @@ -19,7 +19,7 @@ export function HeaderTitleEditor({ const input = inputRef.current; if (input) { input.focus(); - input.setSelectionRange(input.value.length, input.value.length); + input.select(); } }, []);