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

Ipad pro does not count as an tablet, and also plugin doesn't detect is running on ios? #1

Open
danfathom opened this issue Nov 30, 2022 · 6 comments

Comments

@danfathom
Copy link

Ipad pro does not count as an tablet, and also plugin doesn't detect is running on ios?

I've been testing on a ipad pro 12.9 2020.

Any ideas how I can get it to show ipad pros as a tablet? Or is there a way to target all touch devices?

Many thanks,
Dan

@leowebguy
Copy link
Owner

leowebguy commented Nov 30, 2022 via email

@mdominguez
Copy link

Experiencing the same thing, iPad Pro is definitely a tablet device but craft.deviceDetect.isTablet returns false..

@matanlevkowich
Copy link

I am experiencing the same thing with a normal Ipad.

@leowebguy
Copy link
Owner

leowebguy commented Nov 22, 2024

My suggestion is to use isiPadOS instead of isiPad
Mostly if you're simulating via chrome, better rely on the OS than the browser.
I've also updated the detect library https://github.com/serbanghita/Mobile-Detect

Craft 4, "leowebguy/device-detect": "^2.1",
Craft 5, "leowebguy/device-detect": "^3.1",

@matanlevkowich
Copy link

matanlevkowich commented Jan 22, 2025

Still an issue... I have tested on a regular iPad by adding the following code to my template:
{{ craft.deviceDetect.getUserAgent }}

I get the following output on an iPad device:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.1.1 Safari/605.1.15

@leowebguy
Copy link
Owner

Mobile-Detect 950

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

4 participants