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

Reliably focus keyboard on Android #4427

Merged
merged 1 commit into from
Jun 8, 2024
Merged

Reliably focus keyboard on Android #4427

merged 1 commit into from
Jun 8, 2024

Conversation

gaearon
Copy link
Collaborator

@gaearon gaearon commented Jun 8, 2024

My best attempt at making it work based on a real device. Requires some testing.

Copy link

render bot commented Jun 8, 2024

Copy link

github-actions bot commented Jun 8, 2024

Old size New size Diff
7.39 MB 7.39 MB 196 B (0.00%)

Copy link
Contributor

@haileyok haileyok left a comment

Choose a reason for hiding this comment

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

Tested on 3 devices from high to low end (lowest being a 2017 device). Keyboard presents in all cases and is generally smoother than before. This feels good as a guarantee that we don't run into problems. We should still revisit at some point I think but this is much more solid than what we currently have.

@haileyok haileyok merged commit a2d1cf6 into main Jun 8, 2024
6 checks passed
haileyok pushed a commit that referenced this pull request Jun 8, 2024
function tryFocus() {
if (!Keyboard.isVisible()) {
textInput.current?.blur()
textInput.current?.focus()

Choose a reason for hiding this comment

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

we should clear interval here

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.

3 participants