From d4bf7d683117d51ade8f260125a333e28d124876 Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Mon, 6 May 2019 10:45:45 +1000 Subject: [PATCH] FIX: correctly display browser is old message to IE10 We dropped support for IE10 a while back but never amended the banner to show it is not supported. This properly drops support. --- vendor/assets/javascripts/browser-update.js.erb | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/vendor/assets/javascripts/browser-update.js.erb b/vendor/assets/javascripts/browser-update.js.erb index 918c6f775ef..7309e8fdcf8 100644 --- a/vendor/assets/javascripts/browser-update.js.erb +++ b/vendor/assets/javascripts/browser-update.js.erb @@ -11,14 +11,10 @@ var $buo = function() { if (navigator && navigator.userAgent) { ua = navigator.userAgent; } - if (ua && (ua.indexOf('Android 2.2') >= 0 || ua.indexOf('Android 2.3') >= 0)) { - // Android 2.2 and 2.3 browsers report that they have pushState, but they don't really. - // See http://caniuse.com/#search=pushstate - badAndroid = true; - } - // sam: my main concern here is mobile, but its an outlier, for now we support ie10, set conditionally and stuff with pushState - if (window.ie === "new" || (window.history && window.history.pushState && !badAndroid)) { + // sam: we require WeakMap, this allows us to easily feature detect IE10 that does not support it + // This also catches ancient android phones that never had that feature (2.2 and below) + if (window.WeakMap) { return; }