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 <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Gentry Beckmann <gbeckmann@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
This commit is contained in:
Simon Williams 2017-08-26 11:49:51 -06:00 committed by Rob Orton
parent c53c65f55c
commit cda3a3e6c4
1 changed files with 4 additions and 1 deletions

View File

@ -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')