Skip to content
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

Merged
merged 1 commit into from
Nov 8, 2016

Conversation

juliusknorr
Copy link
Member

After fixing regression in #2036 the original bug from #2005 was back, so this PR also reapplys filters for Firefox smaller than version 51.

@juliusknorr juliusknorr added bug 3. to review Waiting for reviews labels Nov 7, 2016
@mention-bot
Copy link

@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.

@juliusknorr
Copy link
Member Author

@juliusknorr juliusknorr added this to the Nextcloud 11.0 milestone Nov 7, 2016
@Luticus
Copy link

Luticus commented Nov 8, 2016

@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>
@juliusknorr juliusknorr force-pushed the firefox-svg-workaround-fix branch from 8a77767 to d3d49c1 Compare November 8, 2016 08:55
@nickvergessen
Copy link
Member

👍 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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about this, doesn't make sense nor a difference?
bildschirmfoto vom 2016-11-08 11-03-24

Copy link
Member Author

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.

@MorrisJobke
Copy link
Member

Tested and works 👍

@MorrisJobke MorrisJobke merged commit 8d47451 into master Nov 8, 2016
@MorrisJobke MorrisJobke deleted the firefox-svg-workaround-fix branch November 8, 2016 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants