arasatasaygin / is.js

Micro check library
http://is.js.org
MIT License
9.16k stars 627 forks source link

is.safari() returns true for Android UC browser #282

Closed heymartinadams closed 11 months ago

heymartinadams commented 6 years ago

Probably because it’s using Safari’s rendering engine. Tested via https://www.browserstack.com/

heymartinadams commented 6 years ago

Perhaps test it via this method instead (source: https://stackoverflow.com/a/9851769/3962062):

var isSafari = /constructor/i.test(window.HTMLElement) || (function (p) { return p.toString() === "[object SafariRemoteNotification]"; })(!window['safari'] || (typeof safari !== 'undefined' && safari.pushNotification))

However, this doesn’t appear to be recognizing Safari mobile.