Bug 1398579 - Port bug 1199729 for folder tree drag and drop. Retrieve dataTransfer also at drop. r=aceman
authorJorg K <jorgk@jorgk.com>
Sun, 10 Sep 2017 23:41:02 +0200
changeset 28858 aa24e45307629490b15ad5165aa8b584cdb758c0
parent 28857 0098371b5fce04ab7b6bbc717e4e41ebe2858c0a
child 28859 1bb96ca92a5c5ef44a9e69532498777bdf40e181
push idunknown
push userunknown
push dateunknown
reviewersaceman
bugs1398579, 1199729
Bug 1398579 - Port bug 1199729 for folder tree drag and drop. Retrieve dataTransfer also at drop. r=aceman
mail/base/content/folderPane.js
mail/base/content/messenger.xul
--- a/mail/base/content/folderPane.js
+++ b/mail/base/content/folderPane.js
@@ -881,16 +881,20 @@ var gFolderTreeView = {
     aEvent.dataTransfer.addElement(aEvent.originalTarget);
     return;
   },
 
   _onDragOver: function ftv_onDragOver(aEvent) {
     this._currentTransfer = aEvent.dataTransfer;
   },
 
+  _onDragDrop: function ftv_onDragDrop(aEvent) {
+    this._currentTransfer = aEvent.dataTransfer;
+  },
+
   /**
    * CSS files will cue off of these.  Note that we reach into the rowMap's
    * items so that custom data-displays can define their own properties
    */
   getCellProperties: function ftv_getCellProperties(aRow, aCol) {
     return this._rowMap[aRow].getProperties(aCol);
   },
 
--- a/mail/base/content/messenger.xul
+++ b/mail/base/content/messenger.xul
@@ -332,16 +332,17 @@
                        collapsed="true"/>
               <tree id="folderTree" class="plain" flex="1"
                     hidecolumnpicker="true" persist="mode" mode="all"
                     keepcurrentinview="true"
                     context="folderPaneContext"
                     disableKeyNavigation="true"
                     ondragstart="gFolderTreeView._onDragStart(event);"
                     ondragover="gFolderTreeView._onDragOver(event);"
+                    ondrop="gFolderTreeView._onDragDrop(event);"
                     ondblclick="gFolderTreeView.onDoubleClick(event);"
                     onselect="FolderPaneSelectionChange();">
                 <treecols id="folderPaneCols">
                   <treecol id="folderNameCol"
                            label2="&folderNameColumn.label;"
                            flex="5"
                            crop="center"
                            persist="width"