Skip to content

fix(code): select task title text when entering rename mode#2332

Open
sampennington wants to merge 1 commit into
mainfrom
posthog-code/select-task-title-on-rename
Open

fix(code): select task title text when entering rename mode#2332
sampennington wants to merge 1 commit into
mainfrom
posthog-code/select-task-title-on-rename

Conversation

@sampennington
Copy link
Copy Markdown
Contributor

Summary

  • 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 characters instead of replacing the name.
  • Replace setSelectionRange(length, length) with input.select() so the full title is highlighted on focus and typing immediately overwrites it.

Test plan

  • Double-click a task in the sidebar → existing title is highlighted; typing replaces it.
  • Use the sidebar context menu "Rename" → existing title is highlighted; typing replaces it.
  • Double-click the task title in the task detail header → existing title is highlighted; typing replaces it.
  • Pressing arrow keys before typing still lets you edit without replacing.

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
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 24, 2026

Reviews (1): Last reviewed commit: "fix(code): select task title text when e..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant