     @list.classList.contains('multi-select')
 
   onDragEnter: (e) =>
-    if header = e.target.closest('.entry.directory > .header')
+    if entry = e.target.closest('.entry.directory')
       return if @rootDragAndDrop.isDragging(e)
 
       e.stopPropagation()
 
-      entry = header.parentNode
       @dragEventCounts.set(entry, 0) unless @dragEventCounts.get(entry)
       unless @dragEventCounts.get(entry) isnt 0 or entry.classList.contains('selected')
         entry.classList.add('drag-over', 'selected')

  # Handle entry drop event
  onDrop: (e) ->
    @dragEventCounts = new WeakMap
    if entry = e.target.closest('.entry')
      return if @rootDragAndDrop.isDragging(e)

      e.preventDefault()
      e.stopPropagation()

      return unless entry.classList.contains('directory')

      newDirectoryPath = entry.querySelector('.name')?.dataset.path
      return false unless newDirectoryPath


  # Handle entry dragover event; reset default dragover actions
  onDragOver: (e) ->
    if entry = e.target.closest('.entry.directory')
      return if @rootDragAndDrop.isDragging(e)

      e.preventDefault()
