There's a brief flash of unstyled tab content (especially noticeable in debug builds during tests)
Categories
(Firefox :: Tabbed Browser, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox72 | --- | fixed |
People
(Reporter: bgrins, Assigned: bgrins)
Details
Attachments
(3 files)
What happens currently is that we first append child content into the tab
when it's connected, then we do attribute inheritance which sets the relevant
styling properties (https://searchfox.org/mozilla-central/rev/11d9c7b7fa82fdfb8ac2a8f0864e9d8d5fe2b926/browser/base/content/tabbrowser-tab.js#109-110). I believe since this is happening inside connectedCallback
we are getting a brief period of time where the tab appears unselected.
Assignee | ||
Comment 1•5 years ago
|
||
This is the problem (accidentally attached the gif with the fix applied in Comment 0).
Assignee | ||
Comment 2•5 years ago
|
||
This prevents a brief flash of unstyled tab content that can be noticed especially
in debug builds.
What happens currently is that we first append child content into the tab
upon connection, then we do attribute inheritance which sets the relevant
styling properties.
With this change we first set up the child content and attributes before appending
the tab into the DOM, so that it's ready to render after being appended.
Assignee | ||
Comment 3•5 years ago
|
||
Using shadow DOM initialized in the constructor of the Custom Element would fix this too - though it would require rewriting a lot of CSS to use Shadow Parts.
Updated•5 years ago
|
Pushed by bgrinstead@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/31efcbdc024b Initialize tabbrowser-tab contents before appending it into the DOM r=dao
Comment 5•5 years ago
|
||
bugherder |
Comment 6•5 years ago
|
||
bugherder landing |
Description
•