Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Learn More

Only certain types of files work with PasteEvent. Pasting multiple files never works

  • Không có trả lời
  • 1 gặp vấn đề này
  • 11 lượt xem
more options

MacOS Big Sur

 Version 11.6

Firefox Developer Edition

 Version 96.0b6
 Build ID 20211216190150

There's some unexpected behavior when pasting files from the OS, in my current case from the Desktop, into the browser. As a minimal example I have open the following url [data:text/html,] then running the code in the first attached image (code.executed.png) in the develop console to get test output when I paste.

Copying a `.png` image on my desktop to the clipboard and pasting within the browser I see what I would expect, which would be a file with a valid type in the event's `event.clipboardData.files` property. As seen in the second attached image (single.png.png).

However, when I switch to copying multiple files, or a file of a non-image type (I've tried `.txt`, `.xlsx` and `.pdf`) it no longer has any file within the before mentioned files property (multiple.pngs.and.single.txt.png). On Chrome I've correctly received the files, and I'm unsure if this is in relation to security, being incorrectly configured in FF, or just a bug.

Thanks in advance.

MacOS Big Sur Version 11.6 Firefox Developer Edition Version 96.0b6 Build ID 20211216190150 There's some unexpected behavior when pasting files from the OS, in my current case from the Desktop, into the browser. As a minimal example I have open the following url [data:text/html,] then running the code in the first attached image (code.executed.png) in the develop console to get test output when I paste. Copying a `.png` image on my desktop to the clipboard and pasting within the browser I see what I would expect, which would be a file with a valid type in the event's `event.clipboardData.files` property. As seen in the second attached image (single.png.png). However, when I switch to copying multiple files, or a file of a non-image type (I've tried `.txt`, `.xlsx` and `.pdf`) it no longer has any file within the before mentioned files property (multiple.pngs.and.single.txt.png). On Chrome I've correctly received the files, and I'm unsure if this is in relation to security, being incorrectly configured in FF, or just a bug. Thanks in advance.
Đính kèm ảnh chụp màn hình