The length of the pasted picture clipboardData.files returns 0
Categories
(Core :: Graphics: ImageLib, defect)
Tracking
()
People
(Reporter: davis.huang, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.80 Safari/537.36
Steps to reproduce:
Paste a picture or file
Actual results:
Copy a picture or file, the clipboardData.files array length triggered when pasting is 0
Expected results:
File information returned
Comment 1•5 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Comment 2•5 years ago
|
||
Thanks for your bug report. We need some more information:
- Where are you copying the image from? (Can you provide the URL or file?)
- Where are you pasting the image?
Can you also please test with https://evercoder.github.io/clipboard-inspector/ ?
Also it might be useful to attach your text from about:support.
Updated•5 years ago
|
(In reply to Tom Schuster [:evilpie] from comment #2)
Thanks for your bug report. We need some more information:
- Where are you copying the image from? (Can you provide the URL or file?)
- Where are you pasting the image?
Can you also please test with https://evercoder.github.io/clipboard-inspector/ ?
Also it might be useful to attach your text from about:support.
Any picture is fine
| Comment hidden (offtopic) |
Comment 5•5 years ago
|
||
Drag and drop works works fine for me and others. Please provide your about:support information.
Comment 6•5 years ago
|
||
The original bug report says that 'clipBoard.files array length is zero'. When I do a cut-and-paste on the clipboard-inspector page, I get the following:
Clipboard & Drop Inspector
Working with the clipboard in web browsers is subject to many quirks and inconsistencies. This tool helps you explore the content of the clipboard when you paste something on a web page, or the data available on a drop event.
event.clipboardData contains:
.types 1 type(s) available
type getData(type)
text/plain x-special/nautilus-clipboard
copy
file:///home/jimb/drawbitmap.html
.items 1 item(s) available
kind type getAsFile()
string text/plain N/A
.files 0 file(s) available
Indeed, the .files list is empty, as the OP says. But the data is available via getData instead. Chrome behaves this way as well. So I don't think there's a bug here.
Updated•5 years ago
|
Comment 7•5 years ago
|
||
Jim it seems like you tried to copy and paste an image file instead of image data. When opening an image for example with Xviewer and then right clicking on the image and selecting "Copy" the result should look like this.
Description
•