Closed jswrenn closed 4 years ago
It appears the body
's class is getting replaced completely (and therefore dropping the theme class which tells it where to get the colors from).
When I inspect I get <body class="1gx416c1bl2ftv1i9i8z592bi8ruzoo9n6zr0ip">
after the interaction. Do you know where this new class is coming from? If we can get it to just add the class instead of removing the previous that may be all we need to do.
It seems to be coming from applyTheme
.
If you right click the <body>
element in Chrome's Inspector, you can set a js breakpoint on attribute modification.
Shouldn't there be a guard on this code to only call f
if e.key
is equal to the provided key?
https://github.com/brownplt/code.pyret.org/blob/horizon/src/web/js/localSettings.js#L25
(@thomascastleman I wouldn't assume that class is supposed to be added to body
at all)
I think this is fixed/deployed now, could someone else check the repro @jswrenn gives above to confirm?
@jpolitz It appears to work now! Thanks
Result: