# HG changeset patch
# User Jorg K
# Date 1462015587 -7200
#      Sat Apr 30 13:26:27 2016 +0200
# Branch THUNDERBIRD3880_2016050308_RELBRANCH
# Node ID ee8993be0ec1fe3567a5cef50251e1df7b8c9dc0
# Parent  2506d7a34aba0d5ce7b8e9a1a0a4ad12ee7bf8c0
Bug 1267804 - Use preventDefault() after address drop. r=aceman a=rkent

diff --git a/mail/components/compose/content/MsgComposeCommands.js b/mail/components/compose/content/MsgComposeCommands.js
--- a/mail/components/compose/content/MsgComposeCommands.js
+++ b/mail/components/compose/content/MsgComposeCommands.js
@@ -4222,18 +4222,26 @@
               attachment.size = size;
 
             attachments.push(attachment);
           }
         }
         else if (item.flavour.contentType == "text/x-moz-address")
         {
           // process the address
-          if (rawData)
+          if (rawData) {
             DropRecipient(aEvent.target, rawData);
+
+            // Since we are now using ondrop (eDrop) instead of previously using
+            // ondragdrop (eLegacyDragDrop), we must prevent the default
+            // which is dropping the address text into the widget.
+            // Note that stopPropagation() is called by our caller in
+            // nsDragAndDrop.js.
+            aEvent.preventDefault();
+          }
         }
       }
 
       if (attachments.length)
         AddAttachments(attachments);
     },
 
   onDragOver: function (aEvent, aFlavour, aDragSession)
