Skip to content
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

Merged
merged 1 commit into from Sep 15, 2014

Conversation

@SergioCrisostomo
Copy link
Member

@SergioCrisostomo SergioCrisostomo commented Sep 14, 2014

Fixes #2652

@SergioCrisostomo SergioCrisostomo force-pushed the SergioCrisostomo:ie-version-fix branch 2 times, most recently from a9b2fd6 to 6824ee0 Sep 14, 2014
@@ -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>*/;

This comment has been minimized.

@arian

arian Sep 15, 2014
Member

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;
}
@SergioCrisostomo SergioCrisostomo force-pushed the SergioCrisostomo:ie-version-fix branch from 6824ee0 to 2238f04 Sep 15, 2014
@SergioCrisostomo
Copy link
Member Author

@SergioCrisostomo SergioCrisostomo commented Sep 15, 2014

@arian that makes much more sense.
You are right, we had already the value from before and were writing-over with a undefined.

Updated the pull request.

if (Browser.name == 'ie'){
Browser.version = document.documentMode;
if (Browser.name == 'ie' && document.documentMode){
Browser.version = document.documentMode;

This comment has been minimized.

@arian

arian Sep 15, 2014
Member

You changed the tab to 4 spaces...

@SergioCrisostomo SergioCrisostomo force-pushed the SergioCrisostomo:ie-version-fix branch from 2238f04 to a9628d3 Sep 15, 2014
@ibolmo ibolmo added the bug label Sep 15, 2014
@ibolmo ibolmo added this to the 1.5.2 milestone Sep 15, 2014
ibolmo added a commit that referenced this pull request Sep 15, 2014
fix IE version detection in old IE
@ibolmo ibolmo merged commit 09b99e5 into mootools:master Sep 15, 2014
1 check passed
1 check passed
continuous-integration/travis-ci The Travis CI build passed
Details
@mootools mootools deleted a comment Feb 2, 2018
@mootools mootools deleted a comment Feb 3, 2020
@mootools mootools deleted a comment Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants
You can’t perform that action at this time.