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

  # 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

      @dragEventCounts.set(entry, @dragEventCounts.get(entry) + 1)

  onDragLeave: (e) =>
    if entry = e.target.closest('.entry.directory')
      return if @rootDragAndDrop.isDragging(e)

      e.stopPropagation()

      @dragEventCounts.set(entry, @dragEventCounts.get(entry) - 1)
      if @dragEventCounts.get(entry) is 0 and entry.classList.contains('drag-over')
        entry.classList.remove('drag-over', 'selected')
