jQuery: The Write Less, Do More JavaScript Library

Ticket #250 (closed bug: fixed)

Opened 2 years ago

Last modified 1 year ago

wrong safari detection

Reported by: matthieu.paineau@… Assigned to: anonymous
Type: bug Priority: critical
Milestone: Component: core
Version: Keywords: safari
Cc: Needs:

Description

Safari is not truly detected because mozilla detection is quite wrong :

Currently when you are in safari, jQuery.browser.safari is true, but jQuery.browser.mozilla is true too, so we go into mozilla condition but never in safari condition.

You should change this code ...

// Figure out what browser is being used
jQuery.browser = {
	safari: /webkit/.test(b),
	opera: /opera/.test(b),
	msie: /msie/.test(b) && !/opera/.test(b),
	mozilla: /mozilla/.test(b) && !/compatible/.test(b)
};

By this code :

// Figure out what browser is being used
jQuery.browser = {
	safari: /webkit/.test(b),
	opera: /opera/.test(b),
	msie: /msie/.test(b) && !/opera/.test(b),
	mozilla: /mozilla/.test(b) && !/compatible/.test(b) && !/webkit/.test(b)
};

Attachments

Change History

Changed 2 years ago by joern

  • status changed from new to closed
  • resolution set to fixed

I'm not sure when, but it has already been fixed in SVN:

mozilla: /mozilla/.test(b) && !/(compatible|webkit)/.test(b)
Note: See TracTickets for help on using tickets.