Skip to content

Commit

Permalink
focus after loading draft fixes 2 issues
Browse files Browse the repository at this point in the history
fixes #3493
fixes #3495
  • Loading branch information
Simon-Laux committed Nov 18, 2023
1 parent c8bfa44 commit dcb0fe7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## [Unreleased][unreleased]

### Fixed
- focus after loading draft fixes:
- fix composer / draft-area not getting focus after click in command #3493
- fix composer does not get focused when selecting a chat with a draft #3495


<a id="1_41_3"></a>

## [1.41.3] - 2023-11-17
Expand Down
3 changes: 3 additions & 0 deletions src/renderer/components/composer/Composer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,9 @@ export function useDraft(
inputRef.current?.setText(newDraft.text)
}
inputRef.current?.setState({ loadingDraft: false })
setTimeout(() => {
inputRef.current?.focus()
})
})
},
[clearDraft, inputRef]
Expand Down

0 comments on commit dcb0fe7

Please sign in to comment.