Bug 1268238 - Reorder accepted flavours so attachment bucket doesn't open. r=mkmelin a=jorgk
authorJorg K
Mon, 20 Jun 2016 02:20:00 +0200
changeset 27243 4f9859a0da24d6b8d1df8de4fa415f29ec95e877
parent 27242 4fdb71bcd424fa76979142d46e8e1b776d0f2eb6
child 27244 9b737b9aeb8114a01c7a9cc1aa5e9578bd912e94
push id1850
push userclokep@gmail.com
push dateWed, 08 Mar 2017 19:29:12 +0000
treeherdercomm-esr52@028df196b2d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkmelin, jorgk
bugs1268238
Bug 1268238 - Reorder accepted flavours so attachment bucket doesn't open. r=mkmelin a=jorgk
mail/components/compose/content/MsgComposeCommands.js
--- a/mail/components/compose/content/MsgComposeCommands.js
+++ b/mail/components/compose/content/MsgComposeCommands.js
@@ -4479,19 +4479,23 @@ var envelopeDragObserver = {
 
   onDragExit: function (aEvent, aDragSession)
     {
     },
 
   getSupportedFlavours: function ()
     {
       var flavourSet = new FlavourSet();
+      // Prefer "text/x-moz-address", so when an address from the address book
+      // is dragged, this flavour is tested first. Otherwise the attachment
+      // bucket would open since the addresses also carry the
+      // "application/x-moz-file" flavour.
+      flavourSet.appendFlavour("text/x-moz-address");
       flavourSet.appendFlavour("text/x-moz-message");
       flavourSet.appendFlavour("application/x-moz-file", "nsIFile");
-      flavourSet.appendFlavour("text/x-moz-address");
       flavourSet.appendFlavour("text/x-moz-url");
       return flavourSet;
     }
 };
 
 var attachmentBucketDNDObserver = {
   onDragStart: function (aEvent, aAttachmentData, aDragAction)
   {