summaryrefslogtreecommitdiffstats
path: root/core/js/js.js
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-02-20 18:42:59 +0100
committerRobin Appelman <icewind@owncloud.com>2014-02-20 18:42:59 +0100
commitdaf28225b7da283763ec84930608e154f49dee46 (patch)
tree388bbaf6277244b3bb085cb34f166c781c693835 /core/js/js.js
parentdde9193b2b523a86220cec494b60f15ef3457e65 (diff)
downloadnextcloud-server-daf28225b7da283763ec84930608e154f49dee46.tar.gz
nextcloud-server-daf28225b7da283763ec84930608e154f49dee46.zip
fix viewport size on windows phone
Diffstat (limited to 'core/js/js.js')
-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 d4d2583f1e5..c7024430aa7 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -987,6 +987,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