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

Focus the text input box after successfully attaching a file #6289

Merged

Conversation

zyphlar
Copy link
Contributor

@zyphlar zyphlar commented Feb 13, 2023

Fixes #6284 - does not focus immediately (so as to avoid stealing
focus) and does not focus if the file browser is cancelled.

First time contributor checklist:

Contributor checklist:

  • My contribution is not related to translations.
  • My commits are in nice logical chunks with good commit messages
  • My changes are rebased on the latest main branch
  • A yarn ready run passes successfully (more about tests here)
  • My changes are ready to be shipped to users

Description

Since there is no Send button, this makes it easier and reduces frustration when adding attachments.
Currently a user must manually click on the text input box or shift-tab to focus it and then press Enter to send.
This change automatically focuses the text input box if an attachment has been added, allowing users to just press Enter.

Manually tested on Ubuntu 22 64-bit / Gnome. No new tests since I can't find good examples of tests for
similarly small UX-related changes, though I'm happy to do so.

 Fixes signalapp#6284 - does not focus immediately (so as to avoid stealing
 focus) and does not focus if the file browser is cancelled.
@indutny-signal
Copy link
Contributor

Thank you! The PR will be merged with the next beta release next week.

@josh-signal josh-signal merged commit ca4defa into signalapp:main Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

File chooser defaults to "choose file" instead of "send" after choosing file
3 participants