File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -263,9 +263,9 @@ async function loadApp() {
263263 } catch ( e ) {
264264 configError = e ;
265265 }
266-
266+
267267 // XXX: We call this twice, once here and once in MatrixChat as a prop. We call it here to ensure
268- // granular settings are loaded correctly and to avoid duplicating the override logic for the theme.
268+ // granular settings are loaded correctly and to avoid duplicating the override logic for the theme.
269269 SdkConfig . put ( configJson ) ;
270270
271271 // don't try to redirect to the native apps if we're
@@ -313,17 +313,26 @@ async function loadApp() {
313313 if ( match ) {
314314 if ( match [ 1 ] === theme ) {
315315 // remove the disabled flag off the stylesheet
316- a . removeAttribute ( "disabled" ) ;
316+
317+ // Firefox requires setting the attribute to false, so do
318+ // that instead of removing it. Related:
319+ // https://bugzilla.mozilla.org/show_bug.cgi?id=1281135
320+ a . disabled = false ;
317321
318322 // in case the Tinter.tint() in MatrixChat fires before the
319323 // CSS has actually loaded (which in practice happens)...
320324
321325 // FIXME: we should probably block loading the app or even
322326 // showing a spinner until the theme is loaded, to avoid
323327 // flashes of unstyled content.
324- a . onload = ( ) => {
328+ a . onload = ( ) => {
325329 Tinter . setTheme ( theme ) ;
326330 } ;
331+ } else {
332+ // Firefox requires this to not be done via `setAttribute`
333+ // or via HTML.
334+ // https://bugzilla.mozilla.org/show_bug.cgi?id=1281135
335+ a . disabled = true ;
327336 }
328337 }
329338 }
You can’t perform that action at this time.
0 commit comments