You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
V14 - ExtendedClientDetails isIPad method does not work #14517
Hi @paodb,
can you please post the client request related to the retrieveExtendedClientDetails?
It should be something like the following
isIpad() checks for v-np to start with iPad
If the value is null, it delegates the check to VaadinSession.getCurrent().getBrowser(), with the following condition browser.isIPad() || (browser.isMacOSX() && isTouchDevice())
A solution can modify ExtendedClientDetails.isIpad be to always delegate to WebBrowser checks if navigatorPlatform does not start with iPad (that basically is the same as the proposed workaround, but done server side)
So, it seems that for iPad and iOS 15 all we can do is assume that if navigatorPlatform is MacIntel and it is a touch device, it is an iPad.
This should work for now, but may not be enough in the future.
Of course, we should also preserve the check for startsWith(iPad)
Activity
mcollovati commentedon Sep 14, 2022
Hi @paodb,
can you please post the client request related to the
retrieveExtendedClientDetails?It should be something like the following
isIpad()checks forv-npto start withiPadIf the value is null, it delegates the check to
VaadinSession.getCurrent().getBrowser(), with the following conditionbrowser.isIPad() || (browser.isMacOSX() && isTouchDevice())mcollovati commentedon Sep 14, 2022
Tested with an IPad Air 2 (iOS 15.6.1) and can replicate the issue.
It seems like that
v-npvalue isMacIntel{ "v-sh":"1024", "v-sw":"768", "v-wh":"665", "v-ww":"1024", "v-bh":"729", "v-bw":"1024", "v-curdate":"1663160988202", "v-tzo":"-120", "v-dstd":"60", "v-rtzo":"-60", "v-dston":"true", "v-tzid":"Europe/Rome", "v-wn":"ROOT-2521314-0.9113661870159819", "v-td":"true", "v-pr":"2", "v-np":"MacIntel" }johannest commentedon Sep 14, 2022
This js snippet seems to work for now, but no guarantee how long before Apple changes something
mcollovati commentedon Sep 14, 2022
A solution can modify
ExtendedClientDetails.isIpadbe to always delegate toWebBrowserchecks ifnavigatorPlatformdoes not start withiPad(that basically is the same as the proposed workaround, but done server side)Original check
Potential change
mcollovati commentedon Sep 15, 2022
So, it seems that for iPad and iOS 15 all we can do is assume that if
navigatorPlatformisMacInteland it is a touch device, it is an iPad.This should work for now, but may not be enough in the future.
Of course, we should also preserve the check for
startsWith(iPad)mcollovati commentedon Sep 15, 2022
Related issue: #14133
fix: adapt iPad detection for iOS 15
fix: adapt iPad detection for iOS 15
fix: adapt iPad detection for iOS 15
fix: adapt iPad detection for iOS 15 (#14541)
fix: adapt iPad detection for iOS 15 (#14547)
fix: adapt iPad detection for iOS 15 (#14547)
fix: adapt iPad detection for iOS 15 (#14547) (#14561)
vaadin-bot commentedon Sep 26, 2022
This ticket/PR has been released with Vaadin 14.8.18.
vaadin-bot commentedon Oct 3, 2022
This ticket/PR has been released with Vaadin 23.3.0.alpha1 and is also targeting the upcoming stable 23.3.0 version.