diff options
author | Morris Jobke <hey@morrisjobke.de> | 2016-11-05 17:05:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-05 17:05:46 +0100 |
commit | a756396739bc76d3a8e96c2a1ab291254650fe6f (patch) | |
tree | e1ad4b63a1d3d76eaa35a4b6e39100a3a7a36857 /core | |
parent | bfd2596381f880c0817d76a87319e89bce798a87 (diff) | |
parent | 71275ced28953e3335dc8fb5a0b077b90bfaf822 (diff) | |
download | nextcloud-server-a756396739bc76d3a8e96c2a1ab291254650fe6f.tar.gz nextcloud-server-a756396739bc76d3a8e96c2a1ab291254650fe6f.zip |
Merge pull request #2018 from nextcloud/firefox-svg-workaround
Workaround for disappearing app icons for Firefox before version 51
Diffstat (limited to 'core')
-rw-r--r-- | core/js/js.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/js/js.js b/core/js/js.js index ce55f47894b..132edaf3ead 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -1837,6 +1837,17 @@ OC.Util.History = { } if (window.history.pushState) { var url = location.pathname + '?' + strParams; + // Workaround for bug with SVG and window.history.pushState on Firefox < 51 + // 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(#"]'); + 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; + } + } if (replace) { window.history.replaceState(params, '', url); } else { |