From edce052660392e22732f9e4374362c0bc87123cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Mon, 5 Dec 2016 11:32:38 +0100 Subject: [PATCH] FIX: isSafari detection wasn't working with latest Safari --- .../discourse/pre-initializers/sniff-capabilities.js.es6 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/pre-initializers/sniff-capabilities.js.es6 b/app/assets/javascripts/discourse/pre-initializers/sniff-capabilities.js.es6 index 9a409fcc827..593cdccf68f 100644 --- a/app/assets/javascripts/discourse/pre-initializers/sniff-capabilities.js.es6 +++ b/app/assets/javascripts/discourse/pre-initializers/sniff-capabilities.js.es6 @@ -20,7 +20,7 @@ export default { caps.isOpera = !!window.opera || ua.indexOf(' OPR/') >= 0; caps.isFirefox = typeof InstallTrigger !== 'undefined'; - caps.isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0; + caps.isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0 || (function (p) { return p.toString() === "[object SafariRemoteNotification]"; })(!window['safari'] || safari.pushNotification); caps.isChrome = !!window.chrome && !caps.isOpera; caps.canPasteImages = caps.isChrome || caps.isFirefox; }