From cda3a3e6c448f15d728ccf5c9c91abd199d426a1 Mon Sep 17 00:00:00 2001 From: Simon Williams Date: Sat, 26 Aug 2017 11:49:51 -0600 Subject: [PATCH] use css var polyfill for ms edge >= 15 fixes CNVS-38866 test plan: - all css vars work in ms edge 15 Change-Id: Ife2aa8f5aba8eeaeb4407f346b05681327cfa550 Reviewed-on: https://gerrit.instructure.com/124111 Reviewed-by: Jeremy Stanley Tested-by: Jenkins QA-Review: Gentry Beckmann Product-Review: Rob Orton --- app/jsx/bundles/common.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/jsx/bundles/common.js b/app/jsx/bundles/common.js index 9c5e9dadb90..c90ca4028d3 100644 --- a/app/jsx/bundles/common.js +++ b/app/jsx/bundles/common.js @@ -117,7 +117,10 @@ if ( }, 'NewUserTutorialsAsyncChunk') } -const supportsCSSVars = window.CSS && window.CSS.supports && window.CSS.supports('(--foo: red)') +// edge < 15 does not support css vars +// edge >= 15 claims to, but is currently broken +const edge = window.navigator.userAgent.indexOf("Edge") > -1 +const supportsCSSVars = !edge && window.CSS && window.CSS.supports && window.CSS.supports('(--foo: red)') if (!supportsCSSVars) { require.ensure([], (require) => { window.canvasCssVariablesPolyfill = require('jsx/canvasCssVariablesPolyfill')