Bug 125571 - Copy & paste from firefox doesn't work
Summary: Copy & paste from firefox doesn't work
Status: RESOLVED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: iOS Editor (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other iOS
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-29 09:06 UTC by Nicolas Christener
Modified: 2019-05-29 12:12 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Video showing the issue (971.49 KB, video/mp4)
2019-05-29 09:07 UTC, Nicolas Christener
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Christener 2019-05-29 09:06:53 UTC
Description:
Copy an image from Safari into the iOS app works as expected, but copy the same image using Firefox (which internally uses webkit on iOS as well) doesn't work.

Doing the same with Apple Pages as target seems to work.

I for example use this picture:
https://de.m.wikipedia.org/wiki/Datei:Jimmy_Cliff_-_Festival_du_Bout_du_Monde_2012_-_022.jpg

Steps to Reproduce:
1. Copy an image from Firefox on iOS
2. Paste into a document

Actual Results:
Nothing gets pasted.

Expected Results:
The image gets pasted into the document.


Reproducible: Always


User Profile Reset: No



Additional Info:
Firefox -> Collabora Office Mobile [NOT OK]
Firefox -> Apple Pages [OK]
Safari  -> Collabora Office Mobile [OK]

And interestingly enough:
Firefox -> Apple Pages [OK] -> Collabora Office Mobile [OK]
Comment 1 Nicolas Christener 2019-05-29 09:07:13 UTC
Created attachment 151755 [details]
Video showing the issue
Comment 2 How can I remove my account? 2019-05-29 11:57:58 UTC
I would assume this is a Firefox bug. The data Firefox puts on the system clipboard ("pasteboard" in iOS terminology) for the image in question is advertised as being of the types public.url and public.png. The Collabora Office app then tries to use the public.png data, assuming (naturally) that it is a PNG image. However, it actually seems to be a JPEG (JFIF) image. The magic number at the start of the data is 0xffd8ffe0, which indicated JPEG. (PNG files start with 0x89504e47).

If one copies the same image to the clipboard in Safari, the advertised types of data are public.url and public.jpeg. (And the Collabora Office app uses the public.jpeg data successfully.)

Not sure how Pages manages to accept it. Maybe it uses the URL data (public.url) and downloads the image anew? Or maybe it has code that determines the actual format of the image from the data contents, despite it being claimed to be PNG? In theory we could do something similar in LibreOffice, but not sure whether it is worth it.
Comment 3 How can I remove my account? 2019-05-29 12:06:31 UTC
Filed a bug against firefox-ios: https://github.com/mozilla-mobile/firefox-ios/issues/5051