-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
MUI Text flickers on firefox #45884
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
Comments
Sorry for making this while researching. I'm trying to get a minimal repro. I'll add a video of whats happening. The parent elements don't seem to be having a rerender. I think the fonts are being fully reloaded and I have no idea why. It makes me look a bit like an idiot with MUI, and I haven't seen it before. Screen.Recording.2025-04-12.at.11.16.55.mov |
Is there an obvious reason for this form the MUI team? |
@gmzacharydovel There's no obvious reason for this on MUI’s side — the components themselves don’t trigger that kind of re-render. A minimal reproduction would really help us investigate further. |
Since the issue is missing key information and has been inactive for 7 days, it has been automatically closed. If you wish to see the issue reopened, please provide the missing information. |
I started on a repro, but I haven't had time. I've done years of react and I'm not really doing something weird. Client for current work will get a flickering app in Firefox. it seems better in Firefox. What I don't understand is this is implying the fonts are loading/unloading which requires very specific css. |
If I can get some time, I'll come back to this. Worst case, I'm trying to move off of MUI to something web component based. But if I can find the time I will find a minimal repro. |
@ZeeshanTamboli I've never seen the flicker before. You have any ideas what would cause it on your side? I have a fair amount of code to cut through... though none of it touches fonts. |
I don’t have anything on my side to check it with. |
@ZeeshanTamboli What I mean is, knowing the code would there be an obvious reason. |
This is a minimal repro project I made. You need to install deno to run it. After that:
Repro:
With more elements, the amount of flickering increases if it has to go down the full dom render tree. My instance is that emotion is adding/remove the css elements which causes firefox to reload the font. Notes:
My Setup:
|
Screen.Recording.2025-04-28.at.9.10.03.movVideo of the repro. |
Here is me reloading the page back and forth repeatedly: Screen.Recording.2025-04-28.at.10.32.53.movThis is actually pretty scary it doesn't load consistently. |
I don't think Chrome has this problem. Chrome also deals better with the garbage collection in dev mode caused by emotion. So that is likely also involved. |
Looks like an issue in Emotion or Firefox. I don't think we can do anything on Material UI's side. |
Steps to reproduce
Steps:
2.Notice the text flickers when opening things like a Select
3.Notice if you use the virtualization examples on the MUI documentation, things flicker like crazy
Current behavior
Text seems to be arbitrarily reloaded. Setting the font with a css important override seems to help somewhat
Expected behavior
The text shouldn't flicker
Context
No response
Your environment
npx @mui/envinfo
Search keywords: font flicker
The text was updated successfully, but these errors were encountered: