From 718e71955ba529b59dd8b3b62411bca06ccce45f Mon Sep 17 00:00:00 2001 From: "John Molakvoæ (skjnldsv)" Date: Tue, 7 May 2019 18:20:24 +0200 Subject: [stable15] Set Edge < 16 as incompatible with css vars MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- core/js/js.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'core/js') 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() { -- cgit v1.2.3