-
Notifications
You must be signed in to change notification settings - Fork 337
Uncaught TypeError: Cannot read property 'msie' of undefined #272
Comments
Sure... https://github.com/jquery/jquery-migrate/#readme In the case of uniform it could be quite difficult to solve this because it's really targeting misbehaving of old IE's 6 and 7, and I don't see anything from $.support to detect these problems, so one way to have compatibility with these browsers would be to have the HTML5 Boilerplate html or body tag conditionals that add classes, so that stuff could be done by something like if ( $('.ie6').length ) { but that would require the devs that want to support these browsers to have these classes in place somewhere (what they probably do anyway if they know what they do =D) |
Looks like I need to get some sort of browser detection put into Uniform. For not I suggest using the migrate stuff above. I'll look into what it takes to do proper feature detection to detect IE. Basically, we're just looking for older IEs that don't support styling select lists properly and some versions of IE that don't do click events correctly. |
Official jQuery API recommends using $.feature detector which built in in jQuery instead of $.browser. |
It's actually $.support, and according to its documentation, they can be changed or removed pretty quick. Instead of maybe relying on something that could be
So, basically it's there but don't use it. Bummer. |
IE = /MSIE/i.test(navigator.userAgent);
IE6 = /MSIE 6/i.test(navigator.userAgent);
IE7 = /MSIE 7/i.test(navigator.userAgent);
IE8 = /MSIE 8/i.test(navigator.userAgent); |
I'm totally aware of that, but I also know that user agents can be changed and Opera frequently masquerades as IE by saying "MSIE 6". I do have a bunch of test results for feature detection on all sorts of browsers and I'll put some time into this problem tomorrow. However, I'd rather solve this for the Trident engine as opposed to just IE. |
As a temporary solution, I just added Bowser as a dependency and fixed all the lines that depend on $.browser - it adds .5k which is neglectable if you can live with the extra dependency |
Here is a solution for detecting IE which can be used instead of |
Using solution from here: #278 until you fix this. Nice plugin ;) |
Thanks for the tips and possible ways to work around this problem. I didn't know that so many people used Uniform. Over the last couple weeks, I've done some work on the develop branch to detect the browser rendering engine through feature detection. I've also ran this code through over 150 different browser/os combinations so I feel pretty comfortable with the changes. The |
Issue #291 posed arguments against needing any browser detection at all for two instances and suggested I also found that IE10 drops support for conditional comments. :-) On the brighter side, I think I've got a good combination that I'll be committing today after I test it more on some computers I have available. |
It's in the develop branch. |
With reference to issue #291: Point 1 - thanks! |
Closing. If this doesn't work for anyone, please provide lots of useful information in either this issue or open a new one. |
Jquery 1.9.0, Uniform 2.0
http://bugs.jquery.com/ticket/13214
The text was updated successfully, but these errors were encountered: