aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authoricewind1991 <robin@icewind.nl>2014-02-21 15:13:20 +0100
committericewind1991 <robin@icewind.nl>2014-02-21 15:13:20 +0100
commitaa0bcf7ba45d004b0c0226fd07696f9f224f9c1c (patch)
tree473b8a3d1b709bb042e79a0b6e46ddf5d69661f9 /core
parent6bde602c093bcd7f8ec06c2b7b4cde4abb8fb9c1 (diff)
parentdaf28225b7da283763ec84930608e154f49dee46 (diff)
downloadnextcloud-server-aa0bcf7ba45d004b0c0226fd07696f9f224f9c1c.tar.gz
nextcloud-server-aa0bcf7ba45d004b0c0226fd07696f9f224f9c1c.zip
Merge pull request #7336 from owncloud/IE-wipho-viewport
fix viewport size on windows phone
Diffstat (limited to 'core')
-rw-r--r--core/js/js.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/js/js.js b/core/js/js.js
index 59d48806418..ec890be4541 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -989,6 +989,17 @@ OC.set=function(name, value) {
context[tail]=value;
};
+// fix device width on windows phone
+(function() {
+ if ("-ms-user-select" in document.documentElement.style && 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);
+ }
+})();
+
/**
* select a range in an input field
* @link http://stackoverflow.com/questions/499126/jquery-set-cursor-position-in-text-area