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

Device infos not correct with iphone and firefox #3876

Closed
schlundus opened this issue Apr 22, 2021 · 0 comments
Closed

Device infos not correct with iphone and firefox #3876

schlundus opened this issue Apr 22, 2021 · 0 comments

Comments

@schlundus
Copy link

In v6, the usage of an iphone in a browser application was not correctly detected when firefox was used because the user agent string doesn't match the expected one in get-devices

Actual UAs from firefox and two iPhone different devices
image
or
image

Because the regexp for iphone expects only a single whitespace between iPhone and OS.... .when it's changed like the iPod-Regexp it works...
const ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/); const iphone = !ipad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/);

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