mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-21 22:30:41 +08:00
Improve attachment interactions on textareas
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
This commit is contained in:
@@ -37,10 +37,10 @@
|
||||
|
||||
const api = new HttpdClient(baseUrl);
|
||||
|
||||
function handleFileDrop(event: DragEvent) {
|
||||
event.preventDefault();
|
||||
if (event.dataTransfer) {
|
||||
const embeds = Array.from(event.dataTransfer.files).map(embed);
|
||||
function handleFileDrop(event: { detail: DragEvent }) {
|
||||
event.detail.preventDefault();
|
||||
if (event.detail.dataTransfer) {
|
||||
const embeds = Array.from(event.detail.dataTransfer.files).map(embed);
|
||||
void Promise.all(embeds).then(embeds =>
|
||||
embeds.forEach(({ oid, name, content }) => {
|
||||
newEmbeds = [
|
||||
|
||||
Reference in New Issue
Block a user