jQuery removed the $.browser feature in 1.9+, instead wanting developers to rely on features. A lot of contrib modules use $.browser, and given the way this change impacts things, could present pretty big obstacles in upgrading modules. Until Drupal requires jQuery 1.9+, thus removing $.browser completely, I think a good alternative would be to add a $.browser plugin when a user is using 1.9+. There's one on Gihub:

https://github.com/gabceb/jquery-browser-plugin

I've used it on a couple of projects needing 1.9+ and it works great. I was thinking it should be included with the core jquery_update project. Considering that is just the stripped out jQuery $.browser implementation, it falls under the same license as jQuery and shouldn't present a problem with including it in the module.

Comments

Jamie Holly’s picture

Issue summary: View changes
phayes’s picture

The jQuery project (https://jquery.com/download/) states:

The jQuery 1.x line had major changes as of jQuery 1.9.0. We strongly recommend that you also use the jQuery Migrate plugin if you are upgrading from pre-1.9 versions of jQuery or need to use plugins that haven't yet been updated

It seems that we should be giving site-admins the option of enabling the jquery-migrate plugin (not the browser plugin). The jQuery migrate plugin can be found here: https://github.com/jquery/jquery-migrate/

phayes’s picture

There is a patch to add the jquery-migrate plugin here: https://drupal.org/node/2156881, which should fix this issue.

Elijah Lynn’s picture

markhalliwell’s picture

Status: Active » Closed (won't fix)

I agree with @phayes/@Elijah Lynn, this should be supported by the jQuery Migrate plugin. We shouldn't directly add support for this particular issue back into the codebase (independently), thus I'm closing this issue in favor of that direction.