Closed Bug 1223129 Opened 10 years ago Closed 10 years ago

Copy action puts both title and url on the pasteboard

Categories

(Firefox for iOS :: General, defect)

Other
iOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
fxios 1.2+ ---

People

(Reporter: st3fan, Assigned: st3fan)

Details

Attachments

(1 file)

This title of this bug is probably a bit misleading because I don't think this is a pasteboard thing but instead an NSExtensionItem issue -- the data we pass to the Share Sheet. STR: 1. Go to a page with a proper title 2. Select Copy from the share menu 3. Go to Safari.app 4. Paste into the location bar Expected: just the URL Actual: The Title + URL Safari does this correctly. We should follow what it does. Note that this is a bit trickier than just removing the title from the data we share. The title Must be in that data because other apps depend on it. For example when you share something to Twitter, the title is taken as the tweet text and the url is used as an attached link.
I think this is important enough to ship in 1.2 is possible.
Assignee: nobody → sarentz
Status: NEW → ASSIGNED
This patch introduces a `TitleActivityItemProvider`. This UIActivityItemProvider subclass does two things that are non-standard behaviour: * We return `NSNull` if the calling activity is not supposed to see the title. For example the *Copy* action, which should only paste the URL. We also include *Message* and *Mail* to have parity with what Safari exposes. * We set the subject of the item to the title, this means it will correctly be used when sharing to for example Mail. Again parity with Safari. Note that not all applications use the Subject. For example *OmniFocus* ignores it, so we need to do both. Tested with the following share extensions: Firefox, Message, Mail, Pocket, Reminder, Notes, OmniFocus, Mail, Twitter, Evernote. Tested with the following action extensions: Copy, Print, Send Tab, View Later.
Attachment #8685591 - Flags: review?(sleroux)
Attachment #8685591 - Flags: review?(jhugman)
Attachment #8685591 - Flags: review?(sleroux) → review+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
\o/
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: