diff --git a/ts/editor/index.ts b/ts/editor/index.ts index 1483fbb48..d621d482b 100644 --- a/ts/editor/index.ts +++ b/ts/editor/index.ts @@ -151,7 +151,7 @@ export class EditingArea extends HTMLDivElement { this.addEventListener("paste", onPaste); this.addEventListener("copy", onCutOrCopy); this.addEventListener("oncut", onCutOrCopy); - this.addEventListener("click", updateButtonState); + this.addEventListener("mouseup", updateButtonState); const baseStyleSheet = this.baseStyle.sheet as CSSStyleSheet; baseStyleSheet.insertRule("anki-editable {}", 0); @@ -166,7 +166,7 @@ export class EditingArea extends HTMLDivElement { this.removeEventListener("paste", onPaste); this.removeEventListener("copy", onCutOrCopy); this.removeEventListener("oncut", onCutOrCopy); - this.removeEventListener("click", updateButtonState); + this.removeEventListener("mouseup", updateButtonState); } initialize(color: string, content: string): void {