Merge pull request #15421 from nextcloud/stb15/fix/cssvars/edge-support

[stable15] Set Edge < 16 as incompatible with css vars
This commit is contained in:
Morris Jobke 2019-05-07 22:18:02 +02:00 committed by GitHub
commit 373a42dfb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View 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() {