]> source.dussan.org Git - nextcloud-server.git/commitdiff
[stable15] Set Edge < 16 as incompatible with css vars 15421/head
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Tue, 7 May 2019 16:20:24 +0000 (18:20 +0200)
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Tue, 7 May 2019 16:30:25 +0000 (18:30 +0200)
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
core/js/js.js

index 5429aaf1a558a0a1202f82a87e13445165e4c4d2..5a187cd8fbbbc0932032be941bd617310379484c 100644 (file)
@@ -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() {