Skip to content

Commit

Permalink
focus after loading draft fixes 2 issues (#3548)
Browse files Browse the repository at this point in the history
fixes #3493
fixes #3495
  • Loading branch information
Simon-Laux committed Nov 21, 2023
1 parent 194b878 commit 116646b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
- fix displaying sticker that has wrong mimetype
- fix bug where composer was locked after joining a group via qr code
- fix double message context menu #3550
- 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>

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 @@ -459,6 +459,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 116646b

Please sign in to comment.