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

[Firefox] Loading the page make UserLinks icons very big for a short period of time #10

Closed
nicobao opened this issue Apr 14, 2020 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@nicobao
Copy link
Contributor

nicobao commented Apr 14, 2020

Description

UserLinks icons in the footer are very large for a short amount of time on loading of the home page, before that everything go back to normal.

Steps to reproduce

  1. Go to https://baozi.technology and scroll down to the footer.
  2. Refresh the page.
  3. Observe the large user links icon for a couple of seconds.

Expected result

The page should load normally, with icons directly in the preferred size.

Actual result

The page is first loaded with very large icons taking the whole window width before quickly changing to the normal preferred size.

Environment

Mozilla Firefox 74.0.1

@nicobao nicobao self-assigned this Apr 14, 2020
@nicobao nicobao added the bug Something isn't working label Apr 14, 2020
@nicobao
Copy link
Contributor Author

nicobao commented Apr 14, 2020

Identify code responsible for the bug

I was able to identify the code responsible for initially loading the icons with large width using breakpoints in the Firefox debugger:

<FontAwesomeIcon icon={faEnvelope} />

in ./src/components/UserLinks/UserLinks.jsx.

Potential solution

Constraint size in css directly to the FontAwesomeIcon component, rather than adjusting the size in the container.

Instead of:

.userLinks{
  font-size: 36px;
}

.userLinksNoSplit{
  font-size: 36px;
}

Do something like:

.theFontAwesomeComponent{
  font-size: 36px;
}

@nicobao
Copy link
Contributor Author

nicobao commented Apr 14, 2020

I tried:

  • suggestion above
  • removing completely the usage of the userlinks component

None of these actions solve the issue.

According to Firefox Debugger, the error (images becoming huge) occurs on the following line:

document.addEventListener("DOMContentLoaded", function(event) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant