summaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-05-07 18:20:24 +0200
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-05-07 18:30:25 +0200
commit718e71955ba529b59dd8b3b62411bca06ccce45f (patch)
tree7d3b91c0b2159497b58d0c04514149e8ffbce6ed /core/js
parent843626ad1622de6375aaf35906a64c6be2d3f31b (diff)
downloadnextcloud-server-718e71955ba529b59dd8b3b62411bca06ccce45f.tar.gz
nextcloud-server-718e71955ba529b59dd8b3b62411bca06ccce45f.zip
[stable15] Set Edge < 16 as incompatible with css vars
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'core/js')
-rw-r--r--core/js/js.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/core/js/js.js b/core/js/js.js
index 5429aaf1a55..5a187cd8fbb 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -1351,8 +1351,13 @@ function initCore() {
}
// css variables fallback for IE
- if (msie > 0 || trident > 0) {
- cssVars();
+ if (msie > 0 || trident > 0 || edge > 0) {
+ console.info('Legacy browser detected, applying css vars polyfill')
+ cssVars({
+ // set edge < 16 as incompatible
+ onlyLegacy: !(/Edge\/([0-9]{2})\./i.test(navigator.userAgent)
+ && parseInt(/Edge\/([0-9]{2})\./i.exec(navigator.userAgent)[1]) < 16)
+ });
}
$(window).on('unload.main', function() {