Use sync formatting for tab tooltip labels
Categories
(Firefox :: Tabbed Browser, task)
Tracking
()
People
(Reporter: eemeli, Unassigned)
References
Details
The same <tooltip>
element is used for all tab tooltips, with its label altering between web page titles and Fluent-localised close/play/mute/unmute buttons. As identified by Gijs in bug 1818916, at least on Windows the current solution leads to momentarily displaying an empty label when starting to hover over a tab button with a localised title.
To work around that, either all of the Fluent messages used for tab tooltips may need to be formatted imperatively rather than declaratively, or the tooltip display may need to be made to wait until its contents are non-empty.
Comment 1•2 years ago
|
||
I think opening the popup itself can't be made to wait very easily, but I was using gBrowser.tabLocalization.formatMessagesSync
for something recently. Looks like there is already a sync Localization instance with all the strings loaded, so maybe the simplest solution is to just use that for tooltips. It looks like that's what the subtitles use for the tab sound UI?
Edit: Actually gBrowser.getTabTooltip
is already using it. Maybe this method could just be merged into createTooltip since it's the only caller, and just simplify all this so there's only one call to the Localization instance It's not the only caller :(
Comment 2•2 years ago
|
||
Emilio is investigating making this all less painful in bug 1819664 so I'd prefer not to add more workarounds / use of sync l10n until that work is done.
Description
•