WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#8936 closed defect (bug) (wontfix)

jQuery browser detection bugs

Reported by: Denis-de-Bernardy Owned by: azaozz
Milestone: Priority: normal
Severity: normal Version:
Component: JavaScript Keywords: needs-patch
Focuses: Cc:

Description

#8933 has a patch that is specific for thickbox, but there are other cases where jQuery.browser is erroneously returning IE6 where it is IE7 or IE8 instead.

Some reference material:

http://jamazon.co.uk/web/2008/07/23/an-ie7-bug-that-returns-msie-60-user-agent-string/

http://dev.jquery.com/ticket/2661

http://dev.jquery.com/ticket/3504#comment:2

Depending on if jQuery 1.3 fixes this or not, we might want to fix jQuery, i.e. where it answers IE6, we'd want to verify if it's not IE8 or IE7.

Change History (3)

comment:1 in reply to: ↑ description @filosofo7 years ago

Replying to Denis-de-Bernardy:

Depending on if jQuery 1.3 fixes this or not, we might want to fix jQuery, i.e. where it answers IE6, we'd want to verify if it's not IE8 or IE7.

jQuery 1.3 has removed browser sniffing. For this functionality we'll need either to use a plugin or to test behavior instead.

comment:2 @azaozz7 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

Filosofo is right, also jQuery 1.2 doesn't have full browser detection either. Best approach is for each script to test for features it needs. If IE7 or IE8 misrepresent themselves as IE6, this should work well:

var isIE6 = typeof document.body.style.maxHeight === "undefined";

comment:3 @jacobsantos7 years ago

  • Milestone 2.9 deleted
Note: See TracTickets for help on using tickets.