Skip to content

[Bug]: iOS composer does nothing when pasting an image from the clipboard #26999

Closed

Description

@smirea

Before submitting

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

Area

apps/mobile

Steps to reproduce

  1. On an iPhone, copy an image to the clipboard (for example, take a screenshot and tap Copy, or long-press an image in Photos or Safari and choose Copy).
  2. Open T3 Code, open a thread, and focus the chat composer.
  3. Long-press inside the composer and choose Paste.

Expected behavior

The image is attached to the draft, the same as choosing it with the photo picker.

Actual behavior

Nothing happens. No attachment appears, no text is inserted, and no error is shown. The clipboard still holds the image, and pasting it into another app works.

Impact

Major degradation or frequent failure

Version or commit

T3 Code iOS 2.1.0

Environment

iPhone 15 Pro, iOS 27

Logs or stack traces

No error is shown in the app.

Workaround

Save the image to Photos, then attach it with the composer's photo picker.

Notes for investigation

Related but separate: #5313 (iOS text paste, fixed) and #17718 (Android Gboard image paste, fixed).

T3ComposerEditorView.paste(_:) in apps/mobile/modules/t3-composer-editor/ios/T3ComposerEditorView.swift does handle images, and every failure along that path is silent:

  • loadImages(from:) drops the error from provider.loadObject(ofClass: UIImage.self). If every provider fails, urls is empty and the method returns without calling onPasteImages or falling back to pasteboard.images.
  • writeTemporaryImage returns nil on failure, which compactMap also discards.
  • paste(_:) returns early when the clipboard has an image provider, so it never reaches super.paste.

I have not confirmed which of these causes it, so this is a starting point, not a diagnosis.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions