Closed Bug 1166892 Opened 9 years ago Closed 8 years ago

Firefox doesn't expose all of the formats on the clipboard

Categories

(Core :: DOM: Events, enhancement)

34 Branch
x86
macOS
enhancement
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 906420

People

(Reporter: evanw, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.152 Safari/537.36

Steps to reproduce:

1. Open an application with interesting clipboard data, such as Keynote
2. Create content in that app and copy
3. Visit http://madebyevan.com/clipboard-test/ and paste into the textbox



Actual results:

I expected the DataTransfer object to expose all clipboard contents so that my web page can use the data that the user copied and pasted into it.



Expected results:

Firefox seems to filter the clipboard so that it appears to contain only text/plain and text/html. I can't see any reason for this filtering and it's really harmful for the web platform. It's currently the biggest area that the web platform is lagging behind the native platform in basic functionality in my opinion.

For example, copying and pasting from Keynote puts the following formats on the clibpoard: com.apple.iWork.TSPDescription, com.apple.iWork.TSPNativeData, com.apple.iWork.TSPNativeMetadata, image/png, image/tiff, public.png, and public.tiff. Any web applications wanting to import content from Keynote will need access to the "com.apple.iWork" formats to be able to do anything useful. All of the other formats just contain flattened data or nothing at all.

The other feature that would make Firefox's clipboard support really shine would be to support copy/paste of files. The DataTransfer object already has the "files" field and it's filled out correctly when dragging and dropping files into the page but it seems to always be empty for paste even when the clipboard contains files. This also harms web applications by preventing them from supporting common user workflows. Firefox actually supports pasting files on Windows, just not on OS X.

Related issue for Chromium: http://crbug.com/487266
Hi,

Do you still have this issue? If yes please download the Firefox Nightly from here: https://nightly.mozilla.org/ and retest the problem.

If you still have the issue please create a new profile, you have the steps here:https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles?redirectlocale=en-US&redirectslug=Managing-profiles#w_starting-the-profile-manager

Please test if the issue can be reproduced in the safe mode of Firefox: https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode

Also they are any other way to reproduce this problem except Keynote?
Flags: needinfo?(evan.exe)
Yes, this is still a problem. It's not something specific to my configuration; it's more of a feature request than a bug report. Lots of other programs other than Keynote have their own clipboard format. I don't have Keynote on my machine right now but I just tried my test page with content copied from GIMP in Firefox Nightly. It reports that there are 0 types on the clipboard even though pasting back into GIMP works fine. Copying and pasting files also still doesn't work (I get the textual filename instead of the file contents).
Flags: needinfo?(evan.exe)
Severity: normal → enhancement
Component: Untriaged → General
OS: Unspecified → Mac OS X
Hardware: Unspecified → x86
Component: General → DOM: Events
Product: Firefox → Core
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.