From 2dc7ab4bbb70abfcdb0aa179935c72ddbb3e66e5 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Wed, 11 Sep 2013 14:46:31 -0700 Subject: fixes #10497: Fix Windows 8 and Windows Phone 8 behavior and apply it to the docs --- assets/js/application.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'assets') diff --git a/assets/js/application.js b/assets/js/application.js index 81b644b97..76c24e5a6 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) -- cgit v1.2.3