insert filename at cursor
parent
756c750bce
commit
eb7631d70e
|
@ -491,12 +491,10 @@ function handle_files(input, newfiles) {
|
||||||
if (span.innerHTML != ' ') span.innerHTML += ', '
|
if (span.innerHTML != ' ') span.innerHTML += ', '
|
||||||
span.innerHTML += file.name.substr(0, 30);
|
span.innerHTML += file.name.substr(0, 30);
|
||||||
if (location.pathname != '/chat')
|
if (location.pathname != '/chat')
|
||||||
ta.value += `[${file.name}]\n`;
|
ta.setRangeText(`[${file.name}]\n`);
|
||||||
}
|
}
|
||||||
|
|
||||||
autoExpand(ta)
|
autoExpand(ta)
|
||||||
ta.focus()
|
|
||||||
ta.selectionStart = ta.selectionEnd = ta.value.length;
|
|
||||||
|
|
||||||
input.parentElement.nextElementSibling.classList.remove('d-none')
|
input.parentElement.nextElementSibling.classList.remove('d-none')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue