Skip to content

Commit

Permalink
Fix the problem of focus in create chat (#3816)
Browse files Browse the repository at this point in the history
* fix #3815

* new entry for change log
  • Loading branch information
farooqkz authored May 12, 2024
1 parent 69f3a76 commit 116d23d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
- fix Clicking notification does not bring Delta Chat to foreground on Windows #3793
- Prevent re-rendering of account sidebar when switching account #3789
- fix help not opening for languages that have no localized help
- fix problem of focus when opening create chat dialogue #3816

### Removed
- remove disabled composer reason, now composer is just always hidden when `chat.canSend` is `false` #3791
Expand Down
4 changes: 3 additions & 1 deletion src/renderer/components/composer/ComposerMessageInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ export default class ComposerMessageInput extends React.Component<

focus() {
log.debug('Focus composer message input')
setTimeout(() => this.textareaRef?.current?.focus())
if (!this.context.hasOpenDialogs) {
setTimeout(() => this.textareaRef?.current?.focus())
}
}

getText() {
Expand Down

0 comments on commit 116d23d

Please sign in to comment.