-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apply firefox workaroud to svg filters #2040
Conversation
@juliushaertl, thanks for your PR! By analyzing the history of the files in this pull request, we identified @nickvergessen, @PVince81 and @LukasReschke to be potential reviewers. |
@juliushaertl, this fix appears to work. All of the icon fix, none of the broken directories. Will let you know if I spot any issues with it but it seems to do the trick for now. Thanks! |
Signed-off-by: Julius Haertl <jus@bitgrid.net>
8a77767
to
d3d49c1
Compare
👍 finally works, thanks! |
@@ -1841,11 +1841,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('[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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was the original workaround from the firefox bug, that applies when there is an inline svg with fill or stroke values. We currently don't have those in Nextcloud, so i guess we could remove it. I thought we could keep it to avoid other bugs coming up, just in case we use inline svg anywhere.
Tested and works 👍 |
After fixing regression in #2036 the original bug from #2005 was back, so this PR also reapplys filters for Firefox smaller than version 51.