web/elements: fix codemirror not being updateable without focus

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-03-31 22:32:28 +02:00
parent f814f7792c
commit a7d9857a69
1 changed files with 2 additions and 6 deletions

View File

@ -44,14 +44,10 @@ export class CodeMirrorTextarea extends LitElement {
}
private getInnerValue(): string {
if (!this.shadowRoot) {
if (!this.editor) {
return "";
}
const ta = this.shadowRoot?.querySelector("textarea");
if (!ta) {
return "";
}
return ta.value;
return this.editor.getValue();
}
static get styles(): CSSResult[] {