b3084fd515cbc3bbc0e4e8085d7cb1714a98b34c
Pasting an image while the markdown editor was focused left it stuck on
ProseMirror's inline "uploading" placeholder instead of going to the
attachment strip. The capture-phase paste interceptor bailed before it
could redirect the file because:
- pasted images usually surface only through `clipboardData.items`
(`getAsFile`), with `clipboardData.files` left empty, and
- image pastes often advertise an *empty* `text/plain` entry, which the
old `types.includes('text/plain')` check mistook for a text paste.
Read files from `items` (falling back to `files`), and gate on the actual
text payload rather than the advertised type, so real text pastes
(Excel/Word renditions) still paste as text while pure image pastes
become attachments.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QtNQeBpkDJPC9obiB25pV6
Description
No description provided
Languages
TypeScript
68.6%
Go
20.6%
C++
8.7%
CSS
0.8%
CMake
0.3%
Other
0.8%