Thanks to visit codestin.com
Credit goes to github.com

Skip to content

The Samsung Galaxy Tab S8 is falsely identified as a mobile device. #596

Closed
@kNoAPP

Description

@kNoAPP

Root cause:
https://github.com/faisalman/ua-parser-js/blob/master/src/ua-parser.js#L376-L381

The problem:
The regex for Samsung mobile devices matches the Tab S8's device number SM-X706B with the regex \b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus). But does not match the tablet's regex of \b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10). Thus, it is being treated as a mobile device. This is not the expected behavior. The Tab S8 should be treated as a tablet device.

For confidence testing, I have also tried the S7's device number SM-T875 which successfully registered as a tablet device. Interestingly, it also passes the mobile device regex-- though this doesn't cause any unwanted/unexpected behavior.

I have not tested earlier tablets from Samsung.

I will propose a PR to fix the regex for the Tab S8 device shortly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions