Closed Bug 1679106 Opened 5 years ago Closed 5 years ago

The length of the pasted picture clipboardData.files returns 0

Categories

(Core :: Graphics: ImageLib, defect)

Firefox 82
Unspecified
Windows 10
defect

Tracking

()

RESOLVED INVALID

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

Type: enhancement → defect

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: General → Graphics: WebRender
OS: Unspecified → Windows 10
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → INVALID
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---

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.

Blocks: 1615397
Component: Graphics: WebRender → ImageLib
Flags: needinfo?(davis.huang)

(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

Flags: needinfo?(davis.huang)

Drag and drop works works fine for me and others. Please provide your about:support information.

Flags: needinfo?(davis.huang)

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.

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → INVALID
Flags: needinfo?(davis.huang)

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.

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

Attachment

General

Creator:
Created:
Updated:
Size: