Last modified: 2014-07-21 11:38:05 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T67255, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 65255 - jquery.client shouldn't be fooled by "Request desktop site" option in mobile browsers
jquery.client shouldn't be fooled by "Request desktop site" option in mobile ...
Status: NEW
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
1.24rc
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: mobile
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-13 11:59 UTC by Liangent
Modified: 2014-07-21 11:38 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Liangent 2014-05-13 11:59:44 UTC
Such an option exists in Chrome and Firefox on Android, and maybe in some other browsers too.

I believe what that option affects is just a user-agent string, and does not change other behaviors of the browser. However (for example in Firefox), with "Request desktop site" on, VisualEditor works happily, while with that option off, VisualEditor refuses to load.

We should check whether VE actually works in these browsers, and have it whitelisted or blacklisted, regardless of whether that option is on or off.
Comment 1 James Forrester 2014-05-13 12:01:20 UTC
Do you mean "make jquery.client detect for Firefox mobile"? If so, that's a very different bug to how you've written this one. :-)
Comment 2 Liangent 2014-05-13 12:05:19 UTC
(In reply to James Forrester from comment #1)
> Do you mean "make jquery.client detect for Firefox mobile"? If so, that's a
> very different bug to how you've written this one. :-)

Hmm? so it's already special cased in jquery.client for Chrome mobile, so there's no such issue in Chrome, without any change in VE side (I haven't really tested)?
Comment 3 James Forrester 2014-05-13 12:08:59 UTC
(In reply to Liangent from comment #2)
> (In reply to James Forrester from comment #1)
> > Do you mean "make jquery.client detect for Firefox mobile"? If so, that's a
> > very different bug to how you've written this one. :-)
> 
> Hmm? so it's already special cased in jquery.client for Chrome mobile, so
> there's no such issue in Chrome, without any change in VE side (I haven't
> really tested)?

I don't know. Your bug report seems to suggest that Firefox Mobile is getting detected as a failing browser, and telling Firefox Mobile to pretend to be Firefox makes it work fine. That's a sign that it's failing jquery.client's test cases.

Do you have an example UA string? https://developer.mozilla.org/en-US/docs/Gecko_user_agent_string_reference suggests that it should be putting out "Mozilla/5.0 (Android; Mobile; rv:13.0) Gecko/13.0 Firefox/13.0".
Comment 4 Liangent 2014-05-13 12:15:35 UTC
By having Firefox hit my own webserver, I caught UA below. Not sure whether it can be different from the one returned by navigator.userAgent.

"Request desktop site" off:

Mozilla/5.0 (Android; Mobile; rv:29.0) Gecko/29.0 Firefox/29.0

JSON.stringify($.client.profile({userAgent:'Mozilla/5.0 (Android; Mobile; rv:29.0) Gecko/29.0 Firefox/29.0',platform:''}))
"{"name":"android","layout":"gecko","layoutVersion":29,"platform":"unknown","version":"mobile","versionBase":"0","versionNumber":0}"

"Request desktop site" on:

Mozilla/5.0 (X11; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.0

JSON.stringify($.client.profile({userAgent:'Mozilla/5.0 (X11; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.0',platform:''}))
"{"name":"firefox","layout":"gecko","layoutVersion":20100101,"platform":"unknown","version":"29.0","versionBase":"29","versionNumber":29}"
Comment 5 Liangent 2014-05-13 12:51:07 UTC
It seems there're two places where UA matters, summarized below:

Browser | Option | profile().name | profile().version | Tab shown | Warning shown
---------------------------------------------------------------------------------
Firefox |   On   |    android     |      mobile       |    No     |      N/A
Firefox |  Off   |    firefox     |       29.0        |    Yes    |      No
Chrome  |   On   |    android     |       4.4.2       |    Yes    |      Yes
Chrome  |  Off   |    chrome      |   34.0.1847.114   |    Yes    |      No

Firefox with the option on is being detected as browser "android" version "mobile" is the most problematic thing here, because it completely disables VE.
Comment 6 Liangent 2014-05-13 12:56:44 UTC
So it's a jquery.client issue: for Chrome and Firefox on Android, profile().name should always be "firefox" or "chrome" respectively, with .version set correctly, no matter how user configures the browser.

Currently in Chrome, profile().platform is "linux". Maybe we can use "android" there to signify the browser is running on Android.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links