Skip to main content

Bug Tracker

Side navigation

#12242 closed bug (wontfix)

Opened August 10, 2012 11:46AM UTC

Closed August 10, 2012 03:43PM UTC

Last modified August 17, 2012 05:40AM UTC

$.browser doesn't report webkit in Chrome anymore

Reported by: bundyo@gmail.com Owned by:
Priority: low Milestone: None
Component: misc Version: 1.8.0
Keywords: Cc:
Blocked by: Blocking:
Description

$.browser, when ran in Chrome and jQuery 1.7.1 reports

safari: true

version: "534.11"

webkit: true

In 1.8.0 it reports

chrome: true

version: "21.0.1180.60"

which is correct, but it should at least include webkit: true, as it is still a WebKit-based browser. I know $.browser is deprecated, but still.

Attachments (0)
Change History (6)

Changed August 10, 2012 03:43PM UTC by timmywil comment:1

component: unfiledmisc
priority: undecidedlow
resolution: → wontfix
status: newclosed

I highly doubt anyone on the core team would care enough about $.browser to make sure it works beyond the current tests.

Besides, $.browser.webkit is becoming less and less useful with Chrome and Safari continually diverging their webkit codepaths.

Changed August 10, 2012 03:49PM UTC by rwaldron comment:2

Also, in 1.9 jQuery.browser will no longer be in the core library

Changed August 10, 2012 03:55PM UTC by dmethvin comment:3

This was introduced in 1.8 as a result of the new Chrome detection. So it just goes to show, no good deed goes unpunished.

I'm inclined to leave $.browser as-is since it's been deprecated since 1.3 and will be gone in 1.9. If you need to know the actual browser/version and expect to need that in the future, it would be better for you to parse navigator.userAgent directly.

Changed August 10, 2012 04:53PM UTC by bundyo@gmail.com comment:4

The problem is that it introduces a breaking change where it shouldn't - the rendering engine in Chrome is still Webkit regardless of the javascript engine and the 3D rendering. However, it doesn't really affect me, so it is up to jQuery to decide how to handle it, if at all.

Changed August 17, 2012 05:31AM UTC by anonymous comment:5

Simple, add this to your project

jQuery.browser.webkit = !!jQuery.browser.chrome;

Changed August 17, 2012 05:40AM UTC by bundyo@gmail.com comment:6

More like

jQuery.browser.webkit = !!jQuery.browser.chrome || jQuery.browser.webkit;

If you want it to work in Safari/other WebKit browsers too.