Files
openclaw/ui
Peter Steinberger da10827439 feat(ui): accept drag-and-drop attachments in the new-session composer (#111530)
* feat(ui): accept drag-and-drop attachments in new-session composer

The new-thread composer only accepted attachments via paste and the +
menu; dragging a file onto it was silently ignored. Wire the shared
chat attachment drop handling onto the composer shell with the same
balanced drag affordance as the chat pane, and gate both composers'
drop/dragover cancellation on file drags so text/URL drops keep the
textarea's native behavior.

* fix(ui): cancel non-file drops outside editable composer targets

A URL dropped on the transcript, header, or composer chrome would hit
the browser default and navigate the app away, discarding drafts. Keep
native text/URL drops only when the drop target is an editable control;
cancel them everywhere else in both composers.

* fix(ui): treat disabled and readonly inputs as non-editable drop targets

A URL dropped precisely on a disabled composer textarea would still hit
the browser default and could navigate away. Check actual editability
(disabled/readOnly/isContentEditable) instead of selector shape.

* fix(ui): limit native drops to text-entry inputs

Enabled non-text inputs (checkbox, range) counted as editable drop
targets, so a URL dropped on one skipped cancellation and could
navigate the browser away. Restrict the native-drop exception to
text-capable input types, textareas, and contenteditable content.
2026-07-19 19:55:29 -07:00
..