chore(client): check textarea exists
This commit is contained in:
parent
4a55a4ec50
commit
9eef655f7a
1 changed files with 4 additions and 2 deletions
|
@ -341,9 +341,11 @@ function addTag(tag: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function focus() {
|
function focus() {
|
||||||
|
if (textareaEl) {
|
||||||
textareaEl.focus();
|
textareaEl.focus();
|
||||||
textareaEl.setSelectionRange(textareaEl.value.length, textareaEl.value.length);
|
textareaEl.setSelectionRange(textareaEl.value.length, textareaEl.value.length);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function chooseFileFrom(ev) {
|
function chooseFileFrom(ev) {
|
||||||
selectFiles(ev.currentTarget ?? ev.target, i18n.ts.attachFile).then(files_ => {
|
selectFiles(ev.currentTarget ?? ev.target, i18n.ts.attachFile).then(files_ => {
|
||||||
|
|
Loading…
Reference in a new issue