mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 06:52:21 -04:00
updateButtonState on clicking editor field
This commit is contained in:
parent
bc7a1d12cd
commit
a19bc2d012
1 changed files with 2 additions and 0 deletions
|
@ -138,6 +138,7 @@ export class EditingArea extends HTMLDivElement {
|
||||||
this.addEventListener("paste", onPaste);
|
this.addEventListener("paste", onPaste);
|
||||||
this.addEventListener("copy", onCutOrCopy);
|
this.addEventListener("copy", onCutOrCopy);
|
||||||
this.addEventListener("oncut", onCutOrCopy);
|
this.addEventListener("oncut", onCutOrCopy);
|
||||||
|
this.addEventListener("click", updateButtonState);
|
||||||
|
|
||||||
const baseStyleSheet = this.baseStyle.sheet as CSSStyleSheet;
|
const baseStyleSheet = this.baseStyle.sheet as CSSStyleSheet;
|
||||||
baseStyleSheet.insertRule("anki-editable {}", 0);
|
baseStyleSheet.insertRule("anki-editable {}", 0);
|
||||||
|
@ -152,6 +153,7 @@ export class EditingArea extends HTMLDivElement {
|
||||||
this.removeEventListener("paste", onPaste);
|
this.removeEventListener("paste", onPaste);
|
||||||
this.removeEventListener("copy", onCutOrCopy);
|
this.removeEventListener("copy", onCutOrCopy);
|
||||||
this.removeEventListener("oncut", onCutOrCopy);
|
this.removeEventListener("oncut", onCutOrCopy);
|
||||||
|
this.removeEventListener("click", updateButtonState);
|
||||||
}
|
}
|
||||||
|
|
||||||
initialize(color: string, content: string): void {
|
initialize(color: string, content: string): void {
|
||||||
|
|
Loading…
Reference in a new issue