diff --git a/ts/editable/editable.ts b/ts/editable/editable.ts index 23d8d4361..099874509 100644 --- a/ts/editable/editable.ts +++ b/ts/editable/editable.ts @@ -57,12 +57,6 @@ export class Editable extends HTMLElement { this.setAttribute("contenteditable", ""); } - focus(): void { - super.focus(); - // TODO - // inCodable.set(false); - } - caretToEnd(): void { caretToEnd(this); } diff --git a/ts/editor/codable.ts b/ts/editor/codable.ts index 618024ecf..c4213c2be 100644 --- a/ts/editor/codable.ts +++ b/ts/editor/codable.ts @@ -72,6 +72,7 @@ export class Codable extends HTMLTextAreaElement { setup(html: string): void { this.fieldHTML = html; this.codeMirror = CodeMirror.fromTextArea(this, codeMirrorOptions); + this.codeMirror.on("blur", () => inCodable.set(false)); } teardown(): string {