Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Browser issues with mobile devices #2400

satazor opened this Issue · 7 comments

3 participants


On an android device running the stock browser (not the chrome one), Browser.safari equals true.
I expected the to be 'unknown' because is not Safari that its running there.

Also Chrome was released for both Android and iOS but reports 'unknown' when running in iOS.
This is because the user agent contains CriOS/XXX instead of Chrome/XXX.

Hope this gets fixed into the core.


After taking a look at the Browser code, as a fallback if Safari is contained in the string then mootools assumes it is safari.
Is this intended?


Chrome on iOS is basically safari in a webview...


@arian if one uses the Browser to make some browser usage statistics it will report the wrong browser. Thats just one example.

@satazor satazor closed this
@satazor satazor reopened this

Ups, closed and reopened by mistake.


For statistics you should save the raw data.

Usually Browser.stuff is used to show certain features or not. Like hide an input[type="file"] on iOS because it won't do anything, but will in Android.

I think changing the UA string to CriOS is done on purpose so it doesn't match chrome, because it's not actual Chrome, but safari, so maybe that should return safari.

For the stock android browser safari makes sense as well, because it's webkit and Browser.platform.Android is true for Android. Browser.Platform.ios for iOS.

Anyway, I don't think we should change too much, using Browser isn't usually a good idea anyway.


I think that if one is targeting the engine, its wrong to check for safari, they should check for webkit instead. Thats why other libraries such as YUI and Dojo offers .webkit, .gecko checks, etc..

I just opened this issue because for me, the Browser name is different than the Browser engine and mootools offers only Browser name checks, and is currently failing (maybe on purpose) to deliver the correct browser name to the final developer.



@fakedarren fakedarren closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.