summaryrefslogtreecommitdiff
path: root/packages/client/src/scripts
diff options
context:
space:
mode:
authorKagami Sascha Rosylight <saschanaz@outlook.com>2022-12-22 14:28:13 +0900
committerGitHub <noreply@github.com>2022-12-22 14:28:13 +0900
commit69087f224208cc11385fe9685b7de12c33aad623 (patch)
tree39ccc233c77b30286669f593a76527e570f9542d /packages/client/src/scripts
parent13.0.0-alpha.4 (diff)
downloadmisskey-69087f224208cc11385fe9685b7de12c33aad623.tar.gz
misskey-69087f224208cc11385fe9685b7de12c33aad623.tar.bz2
misskey-69087f224208cc11385fe9685b7de12c33aad623.zip
enhance(client): update emoji picker immediately on all input (#9385)
* enhance: update emoji picker immediately on all input * refactor: remove reference to window.clipboardData * refactor: done() receives a string * refactor: typescript-favored `.char` access
Diffstat (limited to 'packages/client/src/scripts')
-rw-r--r--packages/client/src/scripts/autocomplete.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/client/src/scripts/autocomplete.ts b/packages/client/src/scripts/autocomplete.ts
index 206724de9e..62de37ed27 100644
--- a/packages/client/src/scripts/autocomplete.ts
+++ b/packages/client/src/scripts/autocomplete.ts
@@ -16,10 +16,14 @@ export class Autocomplete {
private opening: boolean;
private get text(): string {
- return this.textRef.value;
+ // Use raw .value to get the latest value
+ // (Because v-model does not update while composition)
+ return this.textarea.value;
}
private set text(text: string) {
+ // Use ref value to notify other watchers
+ // (Because .value setter never fires input/change events)
this.textRef.value = text;
}