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

fetch called after autocomplete selection on Firefox Android #99

Closed
ofrias opened this issue Jan 16, 2023 · 1 comment
Closed

fetch called after autocomplete selection on Firefox Android #99

ofrias opened this issue Jan 16, 2023 · 1 comment

Comments

@ofrias
Copy link

ofrias commented Jan 16, 2023

On Firefox Mobile, the fetch function is called immediately after selecting one of the autocomplete options.

This is caused by this code:

var mobileFirefox = ~userAgent.indexOf("Firefox") && ~userAgent.indexOf("Mobile");
[...]
// 'keyup' event will not be fired on Mobile Firefox, so we have to use 'input' event instead
var keyUpEventName = mobileFirefox ? "input" : "keyup";

As of January 2023, the current Firefox for Android (version 108.2.0) does support the keyup event, so this custom browser sniffing code should be removed.

Thanks!

@kraaden
Copy link
Owner

kraaden commented Jan 16, 2023

Thanks! I removed the code and published an updated version on npm.

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

2 participants