ios-checkboxes
ios-checkboxes copied to clipboard
Ported $.browser fix
jQuery 1.9 removed $.browser. I just copied the coffee file from the main repo and it fixes the gem for apps using 1.9.
What's this fix about? I am pretty hesitant modifying the jQuery object.
I didn't write it. I just copied it from tdreyno/iphone-style-checkboxes. jQuery.browser has been deprecated for a long time and its been removed as of 1.9. So, the author of that JS library applied this fix.
The commit for the coffeescript is here: https://github.com/tdreyno/iphone-style-checkboxes/commit/3c61765d580235bf202754a6dee1b93f38c1ca53
I see, I see...
From the jQuery upgrade guide:
The jQuery.browser() method has been deprecated since jQuery 1.3 and is removed in 1.9. If needed, it is available as part of the jQuery Migrate plugin. We recommend using feature detection with a library such as Modernizr.
I don't know, but that commit is BAD IMO. The ios-checkboxes should either depend on the jQuery Migrate or deal with it some other way.
"Fixing deprecation" by undeprecating against the library is a bad way of dealing with it, especially when the library actually provides a migration path for that.
Maybe @tdreyno can suggest?
Not sure I want to merge it in.
I don't think jQuery 2.0 will have a migrate plugin, right? Basically, the original plugin needs to work around some IE spacing issues which are not feature detectable. It's only in known versions of IE so we use simple user agent detection.
The code could probably do this internally without re-estabilishing the $.browser
object, but I was just getting the fastest possible solution out for the folks who were reporting the breakage.