element-hq / element-hq/element-ios

Rich Text Composer: Pasting an image copied from Safari pastes the URL.

Open
#6,939 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-Rich-Text-Editor O-Frequent S-Minor T-Defect Z-Labs
Dominant language
Swift
Stars
1.8k
Forks
544
PR merge metrics
PR metrics pending

Description

### Steps to reproduce

1. Open Safari
2. Copy an image
3. Open a room in element and tap on the rich text composer
4. Tap again to bring up the edit menu and tap Paste

### Outcome

#### What did you expect?
The image to be pasted.

#### What happened instead?
The image’s URL was pasted.

Relevant code in RoomInputToolbarTextView is here:
https://github.com/vector-im/element-ios/blob/69aa87067c5bf223094ab3fe26adc3f697f04798/Riot/Modules/Room/Views/InputToolbar/RoomInputToolbarTextView.swift#L122

### Your phone model

iPad Pro

### Operating system version

iPadOS 15.7

### Application version

1.9.9

### Homeserver

_No response_

### Will you send logs?

No

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in Riot/Modules/Room/Views/InputToolbar/RoomInputToolbarTextView.swift at the linked paste-handling code and reproduce the Safari image-copy flow on the reported iPad setup. Trace which pasteboard content is selected, then verify that pasting a copied image inserts the image rather than its URL without breaking ordinary text pasting.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.