Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 0500e91

Browse files
committed
refactor drag image, clicking logic
re-enable a metaclick to allow an item to be selected from the multi-selection. change the behavior of drag image building so that there's no collapsing and properly deselects the drag image.
1 parent 252fa7a commit 0500e91

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/tree-view.coffee

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -738,8 +738,8 @@ class TreeView extends View
738738
onMouseDown: (e) ->
739739
e.stopPropagation()
740740

741-
# return early if there's a multi-select
742-
if @multiSelectEnabled() and e.currentTarget.classList.contains('selected')
741+
# return early if we're opening a contextual menu (right click) during multi-select mode
742+
if @multiSelectEnabled() and e.currentTarget.classList.contains('selected') and not e.metaKey
743743
return
744744

745745
entryToSelect = e.currentTarget
@@ -847,8 +847,9 @@ class TreeView extends View
847847
entryPath = $(entry).find('.name').data('path')
848848
unless path.dirname(entryPath) in initialPaths
849849
initialPaths.push(entryPath)
850-
entry.collapse() if entry instanceof DirectoryView
851-
dragImage.append($(entry).clone().removeClass('selected'))
850+
image = $(entry).clone()
851+
image.find('.entry').addBack('.entry').removeClass('selected')
852+
dragImage.append(image)
852853

853854
dragImage.appendTo(document.body)
854855

0 commit comments

Comments
 (0)