-
Notifications
You must be signed in to change notification settings - Fork 51
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
Fail to detect iPad ios 13+ #20
Comments
Hi, @byjoohyunpark With latest iPad, Desktop Mode is enabled by default. |
Hey @dotneet, thanks for the reply. Safari in IPad IOS 13+ now forces desktop mode as a default. This issue is solved by disabling it. But I guess eventually we will need some extra layer to deal with this setup. |
I am having the same issue, can you please let me know how did you disable the force desktop mode. |
You can create one plugin like below as a temporary solution: This way you can set the device to tablet in case of ipad export default (context, inject) => { |
@sunilrana123 your code will overwrite all export default function (ctx, inject) {
const customIsTabet = ctx.isTablet || ctx.store.state.userAgent.includes('iPad')
inject('device', {
isTablet: customIsTabet,
isMobile: ctx.isMobile,
isMobileOrTablet: ctx.isMobileOrTablet,
isDesktop: !ctx.isMobileOrTablet,
isIos: ctx.isIos,
isWindows: ctx.isWindows,
isMacOS: ctx.isMacOS,
isDesktopOrTablet: !ctx.isMobile,
isAndroid: ctx.isMobileOrTablet && !ctx.isIos
})
} Hope this helps. |
You can now overwrites any flags or add new ones by creating a Nuxt plugin with the v2 of this module. See https://github.com/nuxt-community/device-module#add-a-custom-flag |
iPad even in desktop mode could be detected by a touch events, because no macOS has touch screen. |
iPad useragent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Safari/605.1.15". How to detect is tablet for iPad? |
On latest ios(13+) Safari, it detects iPad as a desktop. Works properly on chrome and other mobil devices. Could you take a look at this issue?
The text was updated successfully, but these errors were encountered: