diff --git a/lib/ace/lib/useragent.js b/lib/ace/lib/useragent.js index 14f0ee9b..b6989a8c 100644 --- a/lib/ace/lib/useragent.js +++ b/lib/ace/lib/useragent.js @@ -73,8 +73,9 @@ exports.isMac = (os == "mac"); // Is the user using a browser that identifies itself as Linux exports.isLinux = (os == "linux"); +// Windows Store JavaScript apps (aka Metro apps written in HTML5 and JavaScript) do not use the "Microsoft Internet Explorer" string in their user agent, but "MSAppHost" instead. exports.isIE = - navigator.appName == "Microsoft Internet Explorer" + (navigator.appName == "Microsoft Internet Explorer" || navigator.appName.indexOf("MSAppHost") >= 0) && parseFloat(navigator.userAgent.match(/MSIE ([0-9]+[\.0-9]+)/)[1]); exports.isOldIE = exports.isIE && exports.isIE < 9;