File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ export async function extractTreeDropData(dataTransfer: VSDataTransfer): Promise
60
60
if ( dataTransfer . has ( resourcesKey ) ) {
61
61
try {
62
62
const asString = await dataTransfer . get ( resourcesKey ) ?. asString ( ) ;
63
- const rawResourcesData = JSON . stringify ( asString ?. split ( '\\ n' ) . filter ( value => ! value . startsWith ( '#' ) ) ) ;
63
+ const rawResourcesData = JSON . stringify ( asString ?. split ( '\n' ) . filter ( value => ! value . startsWith ( '#' ) ) ) ;
64
64
editors . push ( ...createDraggedEditorInputFromRawResourcesData ( rawResourcesData ) ) ;
65
65
} catch ( error ) {
66
66
// Invalid transfer
Original file line number Diff line number Diff line change @@ -826,7 +826,10 @@ abstract class AbstractTreeView extends Disposable implements ITreeView {
826
826
const isTreeEmpty = ! this . root . children || this . root . children . length === 0 ;
827
827
// Hide tree container only when there is a message and tree is empty and not refreshing
828
828
if ( this . _messageValue && isTreeEmpty && ! this . refreshing ) {
829
- this . treeContainer . classList . add ( 'hide' ) ;
829
+ // If there's a dnd controller then hiding the tree prevents it from being dragged into.
830
+ if ( ! this . dragAndDropController ) {
831
+ this . treeContainer . classList . add ( 'hide' ) ;
832
+ }
830
833
this . domNode . setAttribute ( 'tabindex' , '0' ) ;
831
834
} else {
832
835
this . treeContainer . classList . remove ( 'hide' ) ;
You can’t perform that action at this time.
0 commit comments