46db80e962e5c8bcf9a15c3b1f59e0552cf800a0
The whole composer bar is the target, not just the textarea — a screenshot dragged out of the macOS corner thumbnail is a small thing to aim with, and the bar is the biggest thing near where the cursor already is. Paste already worked; this is the same attach path. Three details, each of which breaks the drop silently if missed. `preventDefault` on dragover, or the browser refuses the drop, never fires onDrop, and navigates to the file instead — taking whatever was typed with it. A depth counter rather than a boolean, because dragenter/dragleave fire for every child crossed and the highlight strobes as you move over the textarea. And only claiming drags that carry files, so dragging selected text across the composer neither lights it up nor swallows the drop. Non-image files in the same drag are ignored quietly: refusing the PDF among them with a toast would be noise when the three screenshots you meant went in fine. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Description
No description provided
42 MiB
Languages
TypeScript
90.9%
Shell
4.7%
JavaScript
4.1%
CSS
0.2%
HTML
0.1%