Skip to content

Add HarmonyOS User Agent detection support for mobile device compatibility #442

@wang14525-cpu

Description

@wang14525-cpu

Description

The current mobile device detection logic in iCheck doesn't recognize HarmonyOS devices, causing checkbox interaction issues on H5 pages running on HarmonyOS browsers.

Current Code

Files affected:

  • icheck.js (line 31)
  • icheck.min.js (line 13)
_mobile = /ip(hone|od|ad)|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1);

HarmonyOS User Agent Example
Mozilla/5.0 (Linux; HarmonyOS) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.105

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