Skip to content

Device infos not correct with iphone and firefox #3876

@schlundus

Description

@schlundus

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_]+)/);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions