diff options
author | Mark Otto <otto@github.com> | 2013-09-12 01:46:31 +0400 |
---|---|---|
committer | Mark Otto <otto@github.com> | 2013-09-12 01:46:31 +0400 |
commit | 2dc7ab4bbb70abfcdb0aa179935c72ddbb3e66e5 (patch) | |
tree | b989f3b95046877f355b19f57280926e29bad549 /assets/js | |
parent | 37933a9e08e24e0683c3909aaabe79888e006ba6 (diff) |
fixes #10497: Fix Windows 8 and Windows Phone 8 behavior and apply it to the docs
Diffstat (limited to 'assets/js')
-rw-r--r-- | assets/js/application.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/assets/js/application.js b/assets/js/application.js index 81b644b97a..76c24e5a69 100644 --- a/assets/js/application.js +++ b/assets/js/application.js @@ -6,6 +6,21 @@ $(function(){ + // IE10 viewport hack for Surface/desktop Windows 8 bug + // + // See Getting Started docs for more information + if (navigator.userAgent.match(/IEMobile\/10\.0/)) { + var msViewportStyle = document.createElement("style"); + msViewportStyle.appendChild( + document.createTextNode( + "@-ms-viewport{width:auto!important}" + ) + ); + document.getElementsByTagName("head")[0]. + appendChild(msViewportStyle); + } + + var $window = $(window) var $body = $(document.body) |