Merge pull request #2041 from nextcloud/backport-2036-2040

[stable10] Fix the push state + Apply firefox workaroud to svg filters
This commit is contained in:
Roeland Jago Douma 2016-11-08 20:14:59 +01:00 committed by GitHub
commit 66fac19c41
1 changed files with 3 additions and 1 deletions

View File

@ -1961,11 +1961,13 @@ OC.Util.History = {
// https://bugzilla.mozilla.org/show_bug.cgi?id=652991
var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
if (isFirefox && parseInt(navigator.userAgent.split('/').pop()) < 51) {
var patterns = document.querySelectorAll(selector || '[fill^="url(#"], [stroke^="url(#"]');
var patterns = document.querySelectorAll('[fill^="url(#"], [stroke^="url(#"], [filter^="url(#invert"]');
for (var i = 0, ii = patterns.length, pattern; i < ii; i++) {
pattern = patterns[i];
pattern.style.fill = pattern.style.fill;
pattern.style.stroke = pattern.style.stroke;
pattern.removeAttribute("filter");
pattern.setAttribute("filter", "url(#invert)");
}
}
if (replace) {