aboutsummaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2013-09-11 16:19:12 -0700
committerMark Otto <[email protected]>2013-09-11 16:19:12 -0700
commitcd7cf40aff400eb4ae587d6b375f8c804582a9fc (patch)
tree854727c1d09eb8bade8cc14285bdb84898140b19 /assets
parent6ea2893af1ddb220d449e36b52389fad8c147aba (diff)
parentb0ea3a08cde1a4507cc0f171cbe335407a84b738 (diff)
downloadbootstrap-cd7cf40aff400eb4ae587d6b375f8c804582a9fc.tar.xz
bootstrap-cd7cf40aff400eb4ae587d6b375f8c804582a9fc.zip
Merge pull request #10584 from twbs/ie_viewports
Fixes #10497: Fix Windows 8 and Windows Phone 8 behavior and apply to docs
Diffstat (limited to 'assets')
-rw-r--r--assets/js/application.js15
1 files changed, 15 insertions, 0 deletions
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)