#8936 closed defect (bug) (wontfix)
jQuery browser detection bugs
Reported by: |
|
Owned by: |
|
---|---|---|---|
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)
#1
in reply to:
↑ description
@
16 years ago
#2
@
16 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";
Note: See
TracTickets for help on using
tickets.
Replying to Denis-de-Bernardy:
jQuery 1.3 has removed browser sniffing. For this functionality we'll need either to use a plugin or to test behavior instead.