insert filename at cursor

pull/136/head
Aevann 2023-03-01 23:20:54 +02:00
parent 756c750bce
commit eb7631d70e
1 changed files with 1 additions and 3 deletions

View File

@ -491,12 +491,10 @@ function handle_files(input, newfiles) {
if (span.innerHTML != ' ') span.innerHTML += ', '
span.innerHTML += file.name.substr(0, 30);
if (location.pathname != '/chat')
ta.value += `[${file.name}]\n`;
ta.setRangeText(`[${file.name}]\n`);
}
autoExpand(ta)
ta.focus()
ta.selectionStart = ta.selectionEnd = ta.value.length;
input.parentElement.nextElementSibling.classList.remove('d-none')