diff options
author | Julius Haertl <jus@bitgrid.net> | 2016-11-04 14:51:03 +0100 |
---|---|---|
committer | Julius Haertl <jus@bitgrid.net> | 2016-11-04 15:39:04 +0100 |
commit | 71275ced28953e3335dc8fb5a0b077b90bfaf822 (patch) | |
tree | 364de11db6b65f074ce8560d7eba4686351e4006 | |
parent | a77e7075f627c82a610a2388360488075c850e28 (diff) | |
download | nextcloud-server-71275ced28953e3335dc8fb5a0b077b90bfaf822.tar.gz nextcloud-server-71275ced28953e3335dc8fb5a0b077b90bfaf822.zip |
Workaround for disappearing app icons for Firefox before version 51
Signed-off-by: Julius Haertl <jus@bitgrid.net>
-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 { |