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

Text input loses focus on android devices #614

Closed
josipMocha opened this issue Sep 13, 2023 · 2 comments
Closed

Text input loses focus on android devices #614

josipMocha opened this issue Sep 13, 2023 · 2 comments
Labels
new Flag for new issues before someone replies

Comments

@josipMocha
Copy link

Hey,

First of all, thank you for this awesome lib.

I have an error when using this lib, where on all Android phones if a user clicks on Text input it will quickly lose focus and the keyboard will be shown for a short amount of time and then quickly hidden right after it. I tested it on multiple browsers, and multiple Typeforms, and the issue is present on all text inputs.

On iPhone devices, everything works fine.

Do you experience the same issue?

@github-actions github-actions bot added the new Flag for new issues before someone replies label Sep 13, 2023
@mathio
Copy link
Contributor

mathio commented Sep 14, 2023

Hello, is it possible the whole typeform is being refreshed when the keyboard is displayed? If yes, you might be using hooks / props / state that triggers a re-render on viewport resize - see #611.

@josipMocha
Copy link
Author

Hello @mathio, thank you for the quick response.

I found the issue, it was on our side. Typeform trigger button we rendered inside of the Cakra UI modal and the modal was trapping focus. Strangely enough, it only happened on Android phones.

Fix was setting the Modal prop trapFocus to false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new Flag for new issues before someone replies
Projects
None yet
Development

No branches or pull requests

2 participants