Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: inconsistent & wrong composer.focus() #4136

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

WofWca
Copy link
Collaborator

@WofWca WofWca commented Sep 16, 2024

  • Erasing draft text and immediately focusing another element would return the focus to the composer after 500ms, when the draft gets deleted (clearDraft would get invoked from saveDraft().
  • Composer would not get re-focused when deleting / adding attachments or removing quotation if the draft text is not empty.

.focus() inside of clearDraft() was introduced in 199ea23, most likely to re-focus the input after sending a message. We now have separate code for this, see composerSendMessage.

This change likely needs some more testing.

@WofWca WofWca marked this pull request as ready for review September 16, 2024 13:48
- Erasing draft text and immediately focusing another element
  would return the focus to the composer after 500ms, when the draft
  gets deleted (`clearDraft` would get invoked from `saveDraft()`.
- Composer would not get re-focused when deleting / adding
  attachments or removing quotation if the draft text is not empty.

`.focus()` inside of `clearDraft()` was introduced in
199ea23, most likely to re-focus the
input after sending a message. We now have separate code for this,
see `composerSendMessage`.

This change likely needs some more testing.
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.

1 participant