[Bug]: Pasting mixed text + image clipboard content (e.g. from QQ / WeChat) silently drops the text
Before submitting
- [x] I searched existing issues and did not find a duplicate.
- [x] I included enough detail to reproduce or investigate the problem.
Area
apps/web
Steps to reproduce
- In a messaging app such as QQ (or WeChat) on macOS, copy a message that contains both text and an image (mixed text + image selection).
- Focus the chat composer in T3 Code (
v0.1.11). - Press
Cmd + Vto paste.
Expected behavior
Both the image attachment and the copied text should be pasted into the composer — or at minimum, genuine message text from the clipboard should not be silently discarded when an image is also present.
Actual behavior
Only the image is attached to the composer; all of the copied text is silently dropped.
Root cause (from bundled v0.1.11 source)
In the chat composer paste handler, attachment handling and text insertion are implemented as mutually exclusive if / else branches:
- On normal
Cmd + V(bypassAutoAttachment: false), wheneverclipboardData.filescontains an image, the predicate returnstrueunconditionally regardless ofplainText. - The handler then calls
e.preventDefault()ande.stopPropagation()and only invokesaddComposerAttachments(files)—clipboardData.getData("text/plain")is never inserted into the editor.
This is related to #40686 (which fixed Word text-only copy being misclassified as an image), except in mixed chat messages (QQ / WeChat), the user genuinely wants both the text and the image preserved rather than picking only one. (When copying a standalone image file from Finder where text/plain is just the filename, ignoring the filename makes sense, whereas distinct message text should be kept.)
Impact
Minor bug or occasional failure
Version or commit
0.1.11 (commit 59651c1761f6)
Environment
macOS 26.5.1 (Build 25F80, arm64), T3 Code (Beta) Desktop v0.1.11
Logs or stack traces
Screenshots, recordings, or supporting files
No response
Workaround
Copy and paste the text and image separately (or click Edit → Paste as Text from the menu bar to paste the text first, then press Cmd + V to paste the image).