web/elements: fix flipped theme in codemirror (#4901)
This commit is contained in:
parent
06fb81410b
commit
e13615c1ae
|
@ -131,7 +131,6 @@ export class AKElement extends LitElement {
|
|||
}
|
||||
|
||||
_activateTheme(root: AdoptedStyleSheetsElement, theme: UiThemeEnum) {
|
||||
console.log("activating theme", theme, this._activeTheme, this);
|
||||
if (theme === this._activeTheme) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -150,7 +150,7 @@ export class CodeMirrorTextarea<T> extends AKElement {
|
|||
EditorView.lineWrapping,
|
||||
EditorState.readOnly.of(this.readOnly),
|
||||
EditorState.tabSize.of(2),
|
||||
this.theme.of(this.activeTheme === UiThemeEnum.Dark ? this.themeLight : this.themeDark),
|
||||
this.theme.of(this.activeTheme === UiThemeEnum.Dark ? this.themeDark : this.themeLight),
|
||||
];
|
||||
this.editor = new EditorView({
|
||||
extensions: extensions.filter((p) => p) as Extension[],
|
||||
|
|
Reference in New Issue