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

use a timeout to focus the composer input #4370

Merged
merged 5 commits into from
Jun 5, 2024

Conversation

haileyok
Copy link
Contributor

@haileyok haileyok commented Jun 5, 2024

Why

With the native modal, the input gets focused automatically still, but the keyboard does not present. This occurs both on-device and on an emulator. This is a small hack - one that we've had to use in other modals in the app - to focus the input slightly after the modal presents itself.

Test Plan

With a physical device, test that this properly shows the keyboard after opening. I tested lower intervals, and anything over 50ms worked every time for me, but 100ms feels just a little safer and does not affect anything visually or feel sluggish (since the animation is still ongoing anyway).

Copy link

render bot commented Jun 5, 2024

Copy link

github-actions bot commented Jun 5, 2024

Old size New size Diff
7.4 MB 7.4 MB 172 B (0.00%)

@gaearon gaearon merged commit afbcac3 into main Jun 5, 2024
6 checks passed
@gaearon gaearon deleted the hailey/android-input-focus-hack branch June 5, 2024 02:44
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