Skip to content

fix: refocus input when send message button is pressed#6264

Draft
account1009 wants to merge 2 commits intodeltachat:mainfrom
account1009:main
Draft

fix: refocus input when send message button is pressed#6264
account1009 wants to merge 2 commits intodeltachat:mainfrom
account1009:main

Conversation

@account1009
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown
Member

@WofWca WofWca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Though I think it makes more sense to have the code in the "click" handler of the button somewhere. More narrowly-scoped, and there is not gonna be a delay in focusing.

Comment on lines +284 to +286
setTimeout(() => {
regularMessageInputRef.current?.focus()
})
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment above applies to removeDraft, but now it looks like it applies to the setTimeout.

@account1009
Copy link
Copy Markdown
Author

@WofWca I've moved the focus at the beginning of composerSendMessage to reduce lag. Do you think that the suggestion is fine now?

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.

2 participants