Skip to content

Commit

Permalink
Only execute file open command during drag-and-drop for dragged files
Browse files Browse the repository at this point in the history
Fix for DnD files to main area #8739

Solves issue introduced in f840f60

Contributed by STMicroelectronics
Signed-off-by: Samuel HULTGREN <samuel.hultgren@st.com>
  • Loading branch information
slhultgren authored and vince-fugnitto committed Feb 23, 2021
1 parent e84bb9e commit 925520e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/navigator/src/browser/navigator-widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ export class FileNavigatorWidget extends FileTreeWidget {
this.model.toggleNode(treeNode);
}
});
this.commandService.executeCommand(FileNavigatorCommands.OPEN.id);
if (treeNodes.length > 0) {
this.commandService.executeCommand(FileNavigatorCommands.OPEN.id);
}
});
const handler = (e: DragEvent) => {
if (e.dataTransfer) {
Expand Down

0 comments on commit 925520e

Please sign in to comment.