codecomputerlove/PhotoSwipe — Issue #217: Problem with android and firefox
Author: kareed
Created: 2011-12-12 23:21:33+00:00
State: open

Ran across a problem with an HTC Evo and using Firefox's browser. I crashes on line 5258 of 3.0.4 on this code
if (window.navigator.userAgent.match(/Android (\d+.\d+)/).toString().replace(/^.*\,/, '') >= 2.1)
the match returns null;

This is what an alert of window.navigator.userAgent returns using firefox:
Mozilla/5.0 (Android; Linux armv7l; rv:8.0) Gecko/ Firefox/8.0 Fennec/8.0

The format of the android text is different from what is expected. The following line is what the default browser shows from the same alert:
Mozilla/5.0 (Linux; U; Android 2.2; en-us; Sprint APA9292KT Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1