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 27296 7dcfc3353d0be19b6dc20973c1548f3516551510
parent 27295 41cdfb1f9c8bbdb11bca0e21b915d078cab4c666
child 27297 b6fe48de6b8cf111d140e0e24918210ec72d6e8e
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)
   {