Skip to content

[Bug]: Pasting mixed text + image clipboard content (e.g. from QQ / WeChat) silently drops the text #40890

Closed

Description

@andirtew

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

  1. 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).
  2. Focus the chat composer in T3 Code (v0.1.11).
  3. Press Cmd + V to 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), whenever clipboardData.files contains an image, the predicate returns true unconditionally regardless of plainText.
  • The handler then calls e.preventDefault() and e.stopPropagation() and only invokes addComposerAttachments(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 59651c1)

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).

Activity

  1. added
    bug
    needs-triage
    on Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugneeds-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions