commit 26c79c843d7858f1f33e6291649b38f131e972d4
parent 3554df13c00591f201cedf6db9d958ae97e45364
Author: Greg Stoll <gstoll@mozilla.com>
Date: Mon, 8 Dec 2025 13:58:06 +0000
Bug 1987375 - Remove text/plain flavor when dragging a download to work around Adobe Illustrator r=handyman
When the text/plain flavor is included in a DataTransfer object that is
dropped over Adobe Illustrator, Illustrator prefers that to the file flavor,
and so a text version of the URL is dropped.
This is arguably a bug in Illustrator, but when drag/dropping from Chrome
they don't include the text/plain flavor, so it seems fine to omit it.
Differential Revision: https://phabricator.services.mozilla.com/D275066
Diffstat:
2 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/browser/components/downloads/content/allDownloadsView.js b/browser/components/downloads/content/allDownloadsView.js
@@ -843,7 +843,6 @@ DownloadsPlacesView.prototype = {
dt.mozSetDataAt("application/x-moz-file", file, 0);
let url = Services.io.newFileURI(file).spec;
dt.setData("text/uri-list", url);
- dt.setData("text/plain", url);
dt.effectAllowed = "copyMove";
dt.addElement(selectedItem);
},
diff --git a/browser/components/downloads/content/downloads.js b/browser/components/downloads/content/downloads.js
@@ -1133,7 +1133,6 @@ var DownloadsView = {
dataTransfer.effectAllowed = "copyMove";
let spec = NetUtil.newURI(file).spec;
dataTransfer.setData("text/uri-list", spec);
- dataTransfer.setData("text/plain", spec);
dataTransfer.addElement(element);
aEvent.stopPropagation();