File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -310,12 +310,19 @@ async function loadApp() {
310310 // in case the Tinter.tint() in MatrixChat fires before the
311311 // CSS has actually loaded (which in practice happens)...
312312
313- // FIXME: we should probably block loading the app or even
314- // showing a spinner until the theme is loaded, to avoid
315- // flashes of unstyled content.
313+ // This if fixes Tinter.setTheme to not fire on Firefox
314+ // in case it is the first time loading Riot.
315+ // `InstallTrigger` is a Object which only exists on Firefox
316+ // (it is used for their Plugins) and can be used as a
317+ // feature check.
318+ // Firefox loads css always before js. This is why we dont use
319+ // onload or it's EventListener as thoose will never trigger.
316320 if ( typeof InstallTrigger !== 'undefined' ) {
317321 Tinter . setTheme ( theme ) ;
318322 } else {
323+ // FIXME: we should probably block loading the app or even
324+ // showing a spinner until the theme is loaded, to avoid
325+ // flashes of unstyled content.
319326 a . onload = ( ) => {
320327 Tinter . setTheme ( theme ) ;
321328 } ;
You can’t perform that action at this time.
0 commit comments