Nexus 7 doesn't register as mobile (should it?)

Hi,

I’m currently working on a project where I do a lot of testing on a Nexus 7 tablet. Interestingly, this tablet doesn’t identify as mobile (webix.env.isMobile returns false). I looked at the code that determines that and it’s easy to see why: the string “Mobile” does not appear in the userAgent as returned by the latest version of Chrome. That’s interesting because the same version of Chrome DOES return it on my Galaxy S7, so I’m not sure what Chrome is using to determine the userAgent to return.

It’s an interesting case because the way my app works, it displays things in windows when running on a desktop, but uses a multiview in place of the windows on a mobile device, and the Nexus 7 seems to be something of an in-between situation. Ideally, I’d want it to use the mobile interface, and indeed, I have the ability manually switch between them, but really it would be nice if it defaulted to the mobile interface as the S7 does.

I’m curious to get the thoughts of the community and the Webix team… what, in your view, should the Nexus 7 appear as, mobile or not? I don’t think you want to get in the business of hardcoding for specific devices (although “Nexus 7” does appear in the userAgent, so you actually could)… but it’s just kind of weird to me. To be clear, I don’t see this as a bug in Webix or anything like that, and the logic of the code seems reasonable to me… and clearly I could do my own check of the user agent after Webix does its work (and that’s likely what I’ll do in fact), but I just wanted to throw this out there and see if anyone had any thoughts.

Thanks!

There’s nowebix.env.isMobile (required indicator is touch). All available indicators are listed here. However, I can confirm the issue (due to a typo) withisAndroid. Nexus 7 has to be indicated as any Android device.

We will include the fix in the nearest release.