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

Autocomplete not working on Android #21

Open
Ikrk opened this issue Oct 31, 2020 · 0 comments
Open

Autocomplete not working on Android #21

Ikrk opened this issue Oct 31, 2020 · 0 comments

Comments

@Ikrk
Copy link

Ikrk commented Oct 31, 2020

Hello Carlos,
thanks for the good work.

I have just found out that the script does not work on Android (my phone has Android 8.0 and Chromium 86.0.4240.110).
The reason seems to be a Chromium bug where the keyCode of the keyUp event is not properly recognized and it is always 0 or 229. Therefore the condition if (/[a-zA-Z0-9-_ ]/.test(char) || key === 8) is never satisfied.

I have used a simple workaround and replaced this condition with something like:
if(self._prevInputValue != self._input.value && validInput(self._input.value))
and it works just fine. I am not a JS guy so there might be a more elegant way.

Regards,
Ikrk

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

No branches or pull requests

1 participant