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

Projects
None yet
3 participants
@SergioCrisostomo
Member

SergioCrisostomo commented Sep 14, 2014

Fixes #2652

Show outdated Hide outdated Source/Browser/Browser.js
@@ -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;
}
@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

This comment has been minimized.

Show comment
Hide comment
@SergioCrisostomo

SergioCrisostomo Sep 15, 2014

Member

@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.

Member

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.

Show outdated Hide outdated Source/Browser/Browser.js
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...

@arian

arian Sep 15, 2014

Member

You changed the tab to 4 spaces...

@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

@ibolmo ibolmo merged commit 09b99e5 into mootools:master Sep 15, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details

@mootools mootools deleted a comment Feb 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment