-
Notifications
You must be signed in to change notification settings - Fork 512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix IE version detection in old IE #2653
Conversation
a9b2fd6
to
6824ee0
Compare
@@ -46,7 +46,7 @@ var parse = function(ua, platform){ | |||
var Browser = this.Browser = parse(navigator.userAgent, navigator.platform); | |||
|
|||
if (Browser.name == 'ie'){ | |||
Browser.version = document.documentMode; | |||
Browser.version = document.documentMode/*<ltIE8>*/ || parseFloat(navigator.appVersion.match(/MSIE ([\d.]+)/)[1])/*</ltIE8>*/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't the Browser
object at this point already contain the version? And in the case document.documentMode
is available, it should that instead.
if (Browser.name == 'ie' && document.documentMode){
Browser.version = document.documentMode;
}
6824ee0
to
2238f04
Compare
@arian that makes much more sense. Updated the pull request. |
if (Browser.name == 'ie'){ | ||
Browser.version = document.documentMode; | ||
if (Browser.name == 'ie' && document.documentMode){ | ||
Browser.version = document.documentMode; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You changed the tab to 4 spaces...
2238f04
to
a9628d3
Compare
fix IE version detection in old IE
Fixes #2652