element-hq / element-hq/element-ios
Rich Text Composer: Pasting an image copied from Safari pastes the URL.
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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