Problem
On Linux (WebKitGTK) — and likely other Tauri webviews — dragging a photo or file from the file manager into the message composer inserts the filesystem path as chat text (/home/…/photo.png) instead of attaching/uploading the file.
Paperclip picker and clipboard paste of images still work. Drop is the broken path.
Why
tauri.conf.json has dragDropEnabled: false, so OS drops go to the webview. The composer form has HTML5 onDrop that only reads dataTransfer.files.
Linux WebKitGTK often:
- Leaves
dataTransfer.files empty
- Puts
file://… / an absolute path in text/uri-list or text/plain
- Lets ProseMirror handle the drop first (
editorProps.handleDrop is unset), which inserts that path as text
The window-level handler only preventDefaults when types includes Files, so text/uri-list drops are not claimed.
Expected
Dropping a JPEG/PNG/PDF/etc. onto the composer (or forum composer) should attach it the same way as the paperclip button — upload overlay, then send with the message.
Environment
- Buzz Desktop (self-hosted relay)
- Linux
- Drop from the file manager onto the chat input
Problem
On Linux (WebKitGTK) — and likely other Tauri webviews — dragging a photo or file from the file manager into the message composer inserts the filesystem path as chat text (
/home/…/photo.png) instead of attaching/uploading the file.Paperclip picker and clipboard paste of images still work. Drop is the broken path.
Why
tauri.conf.jsonhasdragDropEnabled: false, so OS drops go to the webview. The composer form has HTML5onDropthat only readsdataTransfer.files.Linux WebKitGTK often:
dataTransfer.filesemptyfile://…/ an absolute path intext/uri-listortext/plaineditorProps.handleDropis unset), which inserts that path as textThe window-level handler only
preventDefaults whentypesincludesFiles, sotext/uri-listdrops are not claimed.Expected
Dropping a JPEG/PNG/PDF/etc. onto the composer (or forum composer) should attach it the same way as the paperclip button — upload overlay, then send with the message.
Environment