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

[FIX] svg render on firefox #9311

Merged
merged 5 commits into from
Jan 3, 2018
Merged

[FIX] svg render on firefox #9311

merged 5 commits into from
Jan 3, 2018

Conversation

karlprieb
Copy link
Contributor

@karlprieb karlprieb commented Jan 2, 2018

@RocketChat/core

Closes #7980
Closes #9179

image

@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-9311 January 2, 2018 19:59 Inactive
@rodrigok rodrigok added this to the 0.60.3 milestone Jan 2, 2018
@@ -0,0 +1,11 @@
/* globals isFirefox */

Copy link
Member

Choose a reason for hiding this comment

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

const baseUrl = isFirefox ? () => window.location.href.replace(window.location.hash, '') : () => ""

Template.icon.helpers({ baseUrl })

Copy link
Member

Choose a reason for hiding this comment

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

@ggazzo Why??

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So the isFirefox check run only one time.

Copy link
Member

Choose a reason for hiding this comment

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

thanks @karlprieb

Copy link
Member

Choose a reason for hiding this comment

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

The if will run only one time, but replace (much heavy) will continue running every time.

I don't see much performance improvement for such non readable code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That function will run over 50 times on every route change, thats why we shouldn't check if is firefox every time.

@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-9311 January 3, 2018 16:15 Inactive
@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-9311 January 3, 2018 16:54 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Right toolbar not displayed in firefox ESR Sometimes Icons don't render on firefox on ubuntu
4 participants