From b56b3fd74a527b265c16ed58eb2b1107217ccdf4 Mon Sep 17 00:00:00 2001 From: Henrik Giesel Date: Mon, 8 Feb 2021 22:18:06 +0100 Subject: [PATCH] Use mouseup intead of click for updateButtonState --- ts/editor/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 {