From 9e827a055109876e3b4cc5ec78d786cd195c932a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Sat, 5 Sep 2026 07:04:37 +0300 Subject: [PATCH] fix(ui): drop the visible file chooser from the files panel The + menu's Upload files covers picking (a label-for on the same input, so it works without script), and the "Drop files here" note described a handler that never existed. The input stays in the DOM, visually hidden as before; the upload script's progress host falls back to the form when no chooser box is present. --- crates/in-web/src/drive.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/crates/in-web/src/drive.rs b/crates/in-web/src/drive.rs index a5ef415..1980342 100644 --- a/crates/in-web/src/drive.rs +++ b/crates/in-web/src/drive.rs @@ -370,11 +370,10 @@ async fn drive(cx: &Cx) -> Result {
- - (t(language, Key::DropFilesHere)) + // No visible chooser here: the + menu's "Upload files" + // label targets this input. It stays in the DOM, display- + // none via the file-upload-input rule. +
for file in listing.files.iter() { @@ -515,7 +514,7 @@ async fn upload_script(cx: &Cx) -> Result { if (!form || form.id !== 'upload-form') { return; } \ e.preventDefault(); \ var input = form.querySelector('.file-upload-input'); \ - var box = form.querySelector('.file-upload-box'); \ + var box = form.querySelector('.file-upload-box') || form; \ var folder = form.querySelector('input[name=folder_id]').value; \ var files = input && input.files ? Array.prototype.slice.call(input.files) : []; \ if (!files.length) { return; } \