IsTablet client action.



This may not be a new idea, but i guess it will be a good suggestion. Now only i have used the IsTablet Client action from the Mobile Patterns, in order to detect the device type like, whether its a Tab or Mobile. But when i tested the client action with the Samsung Tab 3, it is not recognizing the device as a Tab and it is throwing the value False. It may repeat the same scenario to some other tabs also, i am not sure about that. Because this is the only device, i have tested but it performs in this manner. If there is any better changes in this action. It will be good for development.


Vignesh Balasubramanian

Created on 6 Aug 2018
Comments (4)

That sounds like it should be a bug report, not an Idea.


To make it an idea, a Site property or module property could be that you define the screen width at which you decide whether the screen is defined as a phone or a tablet, and if the property is present then the app uses screen width rather than class of phone or tablet to determine the media queries to use.

Russell -

Having survived the bad-old-days of having to maintain a bunch of parsers for Browser-Agent detection and coding around that, I am in NO hurry at all to go back to that. I don't want it to be a site property either, that's very much so the wrong place for it. If it is per-application or per-espace, that's a lot of properties to maintain. If it is per environment, that means that different applications with different theme and UI needs are stuck sharing this environment variable.

Even worse, changing it at all means that all it takes is a quick trip to the administration settings to just DESTROY your themes' appearance. This is why it needs to be a fixed variable, because having your themes look awful because of a configuration change isn't too safe.

Yes, there are some edge cases. 13" Mac Books where the resolution is close to 4k, but the zoom is like 300%, and that makes the viewport really small and gets detected as a tablet. But I guarantee that if people start changing this, they won't eliminate edge cases, just remove some and add others.


Changed the category to Mobile