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

Layout reflow problems in Firefox #222

Open
chrismccord opened this issue Apr 27, 2020 · 0 comments
Open

Layout reflow problems in Firefox #222

chrismccord opened this issue Apr 27, 2020 · 0 comments

Comments

@chrismccord
Copy link

Thanks for this lovely little lib! We are using it by default in Phoenix Liveview and we've had reports of Firefox layout reflows causing flickering. On page load occasionally CSS style are not applied on initial paint, which seems to be caused by a layout reflow triggered by nprogress. The second paint applies the styles. It also seems to be more pronounced with larger css files.

It has been traced down to this following lines:

https://github.com/rstacruz/nprogress/blob/master/nprogress.js#L74
https://github.com/rstacruz/nprogress/blob/master/nprogress.js#L89

When replaced with window.requestAnimationFrame() the issue is reportedly fixed, but I have not tested locally.

Example behavior:
paint1

Expected behavior:
paint2

If I can be of more help, let me know! It would be great to land with the work in #218 . Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant