Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/vscode.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/vs
diff options
context:
space:
mode:
authorAlex Ross <alros@microsoft.com>2022-06-07 15:35:57 +0300
committerGitHub <noreply@github.com>2022-06-07 15:35:57 +0300
commit6a58b4017c4ff76a15b8af57506e3094becbe75c (patch)
tree5fdd932cf0f7f8fe199e5ba53c83b981dc9b1174 /src/vs
parenta0a9b7868d4557933dd95aed6624d647b0f1889f (diff)
Can't drag an item and drop it to an empty treeview (#151213)
Fixes #149890
Diffstat (limited to 'src/vs')
-rw-r--r--src/vs/workbench/browser/parts/views/treeView.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vs/workbench/browser/parts/views/treeView.ts b/src/vs/workbench/browser/parts/views/treeView.ts
index b1c7115bc1c..64ce4c648e5 100644
--- a/src/vs/workbench/browser/parts/views/treeView.ts
+++ b/src/vs/workbench/browser/parts/views/treeView.ts
@@ -826,7 +826,10 @@ abstract class AbstractTreeView extends Disposable implements ITreeView {
const isTreeEmpty = !this.root.children || this.root.children.length === 0;
// Hide tree container only when there is a message and tree is empty and not refreshing
if (this._messageValue && isTreeEmpty && !this.refreshing) {
- this.treeContainer.classList.add('hide');
+ // If there's a dnd controller then hiding the tree prevents it from being dragged into.
+ if (!this.dragAndDropController) {
+ this.treeContainer.classList.add('hide');
+ }
this.domNode.setAttribute('tabindex', '0');
} else {
this.treeContainer.classList.remove('hide');