Skip to content

Commit

Permalink
[botcom] fix inline renaming (tldraw#4769)
Browse files Browse the repository at this point in the history
Clicking the name to rename was broken

### Change type

- [x] `other`
  • Loading branch information
ds300 authored Oct 24, 2024
1 parent 6644f01 commit 3b3d028
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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])

Expand Down

0 comments on commit 3b3d028

Please sign in to comment.