Gallery on telegraph.co.uk does not appear correctly

RESOLVED WORKSFORME

Status

Tech Evangelism
Mobile
RESOLVED WORKSFORME
4 years ago
3 years ago

People

(Reporter: bug.zilla, Unassigned, Mentored)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [country-uk] [js] [contactready], URL)

(Reporter)

Description

4 years ago
Tap on the first image to launch the gallery. On FX it takes you to the jpg itself. Opera launches the gallery.

http://www.telegraph.co.uk/culture/culturepicturegalleries/11231815/Iconic-work-by-master-photographers-celebrated-at-exhibition-in-London.html
(Reporter)

Updated

4 years ago
Summary: Gallery on telegraph.co.uk do not appear correctly → Gallery on telegraph.co.uk does not appear correctly

Updated

4 years ago
Component: General → Mobile
Product: Firefox for Android → Tech Evangelism
Version: Firefox 37 → unspecified

Comment 1

4 years ago
Confirmed with Firefox on Android.
There are event listeners on clicking links,  but I haven't deeply explored.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: [country-uk] [js]

Comment 2

4 years ago
description
It's testable by faking a UA on Desktop be Firefox Android or Opera/Chrome on Android. The trigger seems to be the version number of Android.

In the script code.photoswipe.3.0.4.min.js, there is 

			if (Util.Browser.android){
				if (window.navigator.userAgent.match(/Android (\d+.\d+)/).toString().replace(/^.*\,/, '') >= 2.1){
					this.isBackEventSupported = true;
				}
			}

			if (!this.isBackEventSupported){
				this.isBackEventSupported = Util.objectHasProperty(window, 'onhashchange');
			}

This will fail for Firefox Android UA. When we add the non existent version number in the UA:

   'User-Agent:Mozilla/5.0 (Android 4.4.0; Mobile; rv:30.0) Gecko/30.0 Firefox/30.0'

We get the correct behavior.
Whiteboard: [country-uk] [js] → [country-uk] [js] [contactready]

Comment 3

4 years ago
howtofix
The script used by Telegraph is coming from http://photoswipe.com/
This was fixed it seems in recent versions of the script (version >= 3.0.5)
https://github.com/dimsemenov/PhotoSwipe/blob/e456211939de1dff0f1225407c9791f93c791a91/src/photoswipe.class.js#L133


> Fixed user agent string issues with Firefox for Androidhttps://github.com/dimsemenov/PhotoSwipe/blob/e456211939de1dff0f1225407c9791f93c791a91/README.md#latest-release-v305

We need to ask Telegraph to upgrade their photoswipe script. They are currently using version 3.0.4
/* version: 3.0.4 customized to our needs*/

Btw, Telegraph team removed the MIT original license, which is against the license of this code.

Updated

4 years ago
Mentor: kdubost
(Reporter)

Comment 4

3 years ago
Seems to work now. Thanks for contacting the Telegraph team.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.