Open Bug 864052 Opened 12 years ago Updated 3 months ago

clipboardData only supports pasting one file

Categories

(Core :: DOM: Copy & Paste and Drag & Drop, defect, P5)

22 Branch
x86_64
Windows 7
defect

Tracking

()

People

(Reporter: amla70, Unassigned)

References

(Blocks 3 open bugs)

Details

(Keywords: parity-chrome, parity-safari)

Attachments

(1 file)

Attached file testcase
With bug 407983 now it's possible to add a file in a contentEditable element by pasting it, but if more than one file is selected in the OS only the first one is available in the paste event. Check attached testcase, select 2 or more files (don't select images to avoid the default insertion of data: encoded imgs) and only one of them will be reported. Tested with Aurora 22.0a2 (2013-04-19) and Nightly 23.0a1 (2013-04-20)
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046 Move all DOM bugs that haven't been updated in more than 3 years and has no one currently assigned to P5. If you have questions, please contact :mdaly.
Priority: -- → P5
Component: DOM: Core & HTML → DOM: Copy & Paste and Drag & Drop
Severity: normal → S3
Blocks: 1954680
Duplicate of this bug: 1976883

To implement this, I think we should try to align the implementation of the Clipboard with Drag&Drop. Drag&Drop already supports multiple files, which means the DataTransfer code on the DOM-side also supports it. What is missing is 1. Widget support and the glue code in between. I think this code shows one of the main difference in our handling. For DnD we have an index, which we can use to differentiate between different files. The clipboard code on the other hand from the platform-specific widget code to DOM's DataTransfer just differentiates between different items by (MIME) type. Most of that code should probably be unified to have a consistent interface, so that clipboard and DnD work the same.

One thing I haven't looked into, which from my memory often caused issues: How we share the file data or handles from the parent to child. I think historically we had a lot of problems with that, but that might have been solved in the last few years.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: