   #console.log "#{id} corresponds to #{image}"
   checkImage image if image?
 
-messageDrag = (target, bodyToo = true, old) ->
-  return unless target
-  onDragStart = (e) =>
-    #url = "coauthor:#{@data._id}"
-    url = urlFor 'message',
-      group: @data.group
-      message: @data._id
-    e.dataTransfer.effectAllowed = 'linkMove'
-    e.dataTransfer.setData 'text/plain', url
-    e.dataTransfer.setData 'application/coauthor-id', @data._id
-    e.dataTransfer.setData 'application/coauthor-type', type
-  type = 'message'
-  if @data.file
-    type = fileType @data.file
-    #console.log @data.file, type
-    #if "class='odd-file'" not in formatted and
-    #   "class='bad-file'" not in formatted
-    #  url = formatted
-    if bodyToo
-      $(@find '.message-file')?.find('img, video, a, canvas')?.each (i, elt) =>
-        elt.removeEventListener 'dragstart', old if old?
-        elt.addEventListener 'dragstart', onDragStart
-  target.removeEventListener 'dragstart', old if old?
-  target.addEventListener 'dragstart', onDragStart
-  onDragStart
+messageOnDragStart = (message) -> (e) ->
+  #url = "coauthor:#{message._id}"
+  url = urlFor 'message',
+    group: message.group
+    message: message._id
+  e.dataTransfer.effectAllowed = 'linkMove'
+  e.dataTransfer.setData 'text/plain', url
+  e.dataTransfer.setData 'application/coauthor-id', message._id
+  e.dataTransfer.setData 'application/coauthor-type',
+    if message.file
+      type = fileType message.file
+    else
+      'message'
 
 ## A message is "naturally" folded if it is flagged as minimized or deleted.
 ## It still will be default-folded if it's an image referenced in another

                      <span className="fas fa-minus" aria-hidden="true"/>
                    </button>
                }
                <a className="btn btn-info focusButton" aria-label="Focus" href={pathFor 'message', {group: message.group, message: message._id}} draggable="true" data-toggle="tooltip" data-container="body" title="Zoom in/focus on just the subthread of this message and its descendants">
                  <span className="fas fa-sign-in-alt" aria-hidden="true"/>
                </a>
              </>

      {renderedChildren}
    </li>
TableOfContents.displayName = 'TableOfContents'

addDragOver = (e) ->
  e.preventDefault()
