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
This commit is contained in:
Kagami Sascha Rosylight 2022-12-22 14:28:13 +09:00 committed by GitHub
parent aa23dbbb8a
commit 69087f2242
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 9 deletions

View file

@ -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;
}