Drag image to other app from blob url doesn't work
Categories
(Core :: DOM: Copy & Paste and Drag & Drop, defect)
Tracking
()
People
(Reporter: descent-tact0m, Assigned: edgar)
References
()
Details
(Keywords: webcompat:platform-bug)
Attachments
(3 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.11 Safari/537.36
Steps to reproduce:
Steps to reproduce the problem:
- Open https://mdn.mozillademos.org/en-US/docs/Web/API/File/Using_files_from_web_applications$samples/Example_Using_object_URLs_to_display_images?revision=1644987
- Select an image
- Drag the image displayed on the page to another app, e.g. Word
Actual results:
The image is copied to Word
Expected results:
"blob:https://mdn.mozillademos.org/90909672-2cac-4398-9f43-6dfecc8aa987" is copied to Word
Reporter | ||
Comment 1•5 years ago
|
||
oh wait I accidently reversed the actual results and expected results
Correct my typo:
Expected results: The image is copied to Word
Actual results: "blob:https://mdn.mozillademos.org/90909672-2cac-4398-9f43-6dfecc8aa987" is copied to Word
![]() |
||
Updated•5 years ago
|
Updated•5 years ago
|
Comment 2•4 years ago
|
||
(In reply to jackworks from comment #1)
oh wait I accidently reversed the actual results and expected results
Correct my typo:
Expected results: The image is copied to Word
Actual results: "blob:https://mdn.mozillademos.org/90909672-2cac-4398-9f43-6dfecc8aa987" is copied to Word
The link on comment 0 was no longer valid. I tried dragging images from other web pages to Word. I didn't encounter the issue mentioned.
It'd be great to share a link if this issue is still reproducible.
Updated•2 months ago
|
Updated•1 month ago
|
Updated•1 month ago
|
Updated•1 month ago
|
Comment 3•1 month ago
|
||
It's this example on MDN.
The bug here is that when dragging and dropping an image from a blob URL, we treat the content "as a link to a blob", not as an image. Given that this is a core bug with a testcase, and not about "a real site", we'll remove the site-report flag here.
Assignee | ||
Comment 4•22 days ago
•
|
||
There is some investigation in https://bugzilla.mozilla.org/show_bug.cgi?id=1967706#c7.
Assignee | ||
Comment 5•22 days ago
|
||
The data difference in nsITransferable
is due to https://searchfox.org/mozilla-central/rev/058836008f131ae5591d04952a1500c9f94bedbc/dom/base/nsContentAreaDragDrop.cpp#382-386, where BlobURL
is not a nsIURL
, so the image data isn't set properly for blob.
Assignee | ||
Comment 6•22 days ago
|
||
Assignee | ||
Comment 7•22 days ago
|
||
Depends on D255281
Updated•22 days ago
|
Assignee | ||
Comment 8•21 days ago
|
||
Make it easier to add subtests. And also add tests for dom.events.dataTransfer.imageAsFile.enabled=false.
Depends on D255281
Updated•21 days ago
|
Updated•21 days ago
|
Updated•18 days ago
|
Updated•16 days ago
|
Updated•16 days ago
|
Updated•16 days ago
|
Comment 10•15 days ago
|
||
Comment 11•15 days ago
|
||
Revert for causing mochitest-plain failures test_dragstart.html.
[task 2025-07-03T21:18:28.052+00:00] 21:18:28 INFO - TEST-PASS | dom/events/test/test_dragstart.html | link text/plain
[task 2025-07-03T21:18:28.052+00:00] 21:18:28 INFO - Sending events for image
[task 2025-07-03T21:18:28.053+00:00] 21:18:28 INFO - Buffered messages finished
[task 2025-07-03T21:18:28.053+00:00] 21:18:28 WARNING - TEST-UNEXPECTED-FAIL | dom/events/test/test_dragstart.html | initial image types length - got 12, expected 8
[task 2025-07-03T21:18:28.053+00:00] 21:18:28 INFO - SimpleTest.is@SimpleTest/SimpleTest.js:509:14
[task 2025-07-03T21:18:28.053+00:00] 21:18:28 INFO - checkTypes@dom/events/test/test_dragstart.html:606:7
[task 2025-07-03T21:18:28.053+00:00] 21:18:28 INFO - doDragStartImage@dom/events/test/test_dragstart.html:478:13
[task 2025-07-03T21:18:28.053+00:00] 21:18:28 INFO - ondragstart@dom/events/test/test_dragstart.html:1:17
[task 2025-07-03T21:18:28.053+00:00] 21:18:28 INFO - synthesizeMouseAtPoint@SimpleTest/EventUtils.js:794:32
[task 2025-07-03T21:18:28.053+00:00] 21:18:28 INFO - synthesizeMouse@SimpleTest/EventUtils.js:557:10
[task 2025-07-03T21:18:28.053+00:00] 21:18:28 INFO - sendMouseEventsForDrag@dom/events/test/test_dragstart.html:126:18
[task 2025-07-03T21:18:28.053+00:00] 21:18:28 INFO - afterDragTests@dom/events/test/test_dragstart.html:62:25
[task 2025-07-03T21:18:28.053+00:00] 21:18:28 INFO - setTimeout handler*SimpleTest_setTimeoutShim@SimpleTest/SimpleTest.js:922:41
[task 2025-07-03T21:18:28.053+00:00] 21:18:28 INFO - doDragStartSelection@dom/events/test/test_dragstart.html:181:13
[task 2025-07-03T21:18:28.054+00:00] 21:18:28 INFO - ondragstart@dom/events/test/test_dragstart.html:1:21
[task 2025-07-03T21:18:28.054+00:00] 21:18:28 INFO - synthesizeMouseAtPoint@SimpleTest/EventUtils.js:794:32
[task 2025-07-03T21:18:28.054+00:00] 21:18:28 INFO - synthesizeMouse@SimpleTest/EventUtils.js:557:10
[task 2025-07-03T21:18:28.054+00:00] 21:18:28 INFO - runTests@dom/events/test/test_dragstart.html:26:18
[task 2025-07-03T21:18:28.054+00:00] 21:18:28 INFO - setTimeout handler*SimpleTest_setTimeoutShim@SimpleTest/SimpleTest.js:922:41
[task 2025-07-03T21:18:28.054+00:00] 21:18:28 INFO - onload@dom/events/test/test_dragstart.html:1:11
[task 2025-07-03T21:18:28.054+00:00] 21:18:28 INFO - TEST-PASS | dom/events/test/test_dragstart.html | initial image text/x-moz-url check
Comment 12•12 days ago
|
||
Comment 13•12 days ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/5f296eccb12c
https://hg.mozilla.org/mozilla-central/rev/aeef5fe408e3
https://hg.mozilla.org/mozilla-central/rev/65212684745e
Assignee | ||
Updated•12 days ago
|
Comment 15•9 days ago
|
||
:edgar did you want to mention this in the fx142 release notes? Feel free to nominate if so.
Assignee | ||
Comment 16•4 days ago
|
||
Release Note Request (optional, but appreciated)
[Why is this notable]: Improve how Firefox handles blob images in drag-and-drop operations.
[Affects Firefox for Android]: Yes, but Firefox doesn't support drag-and-drop with touch input.
[Suggested wording]: Drag-and-drop support for blob images has been improved.
[Links (documentation, blog post, etc)]: None.
Comment 17•4 days ago
|
||
Added to fx142 notes https://www.mozilla.org/en-US/firefox/142.0a1/releasenotes/
Description
•