Skip to content

Commit 4c44f69

Browse files
committed
Undo the IE8/IE7 objection detection
1 parent fc1432f commit 4c44f69

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

data/js/detect/os.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -964,10 +964,13 @@ window.os_detect.getVersion = function(){
964964

965965
// IE8 detection straight from IEBlog. Thank you Microsoft.
966966
if (!ua_version) {
967-
if (css_is_valid('display', 'display', 'table-cell')) {
968-
ua_version = '7.0';
969-
} else {
970-
ua_version = '8.0';
967+
try {
968+
ua_version = "8.0";
969+
document.documentElement.style.display = "table-cell";
970+
} catch(e) {
971+
// This executes in IE7,
972+
// but not IE8, regardless of mode
973+
ua_version = "7.0";
971974
}
972975
}
973976
} else if (document.compatMode) {

0 commit comments

Comments
 (0)