提交 900f1007 编写于 作者: I isidor

fixes #70276

上级 863c811b
......@@ -319,9 +319,8 @@ export class ExplorerView extends ViewletPanel {
// Check if the item was previously also selected, if yes the user is simply expanding / collapsing current selection #66589.
const shiftDown = e.browserEvent instanceof KeyboardEvent && e.browserEvent.shiftKey;
if (selection.length === 1 && !shiftDown) {
// Do not react if user is clicking on explorer items which are input placeholders
if (!selection[0].name || selection[0].isDirectory) {
// Do not react if user is clicking on explorer items which are input placeholders
if (selection[0].isDirectory || this.explorerService.isEditable(undefined)) {
// Do not react if user is clicking on explorer items while some are being edited #70276
// Do not react if clicking on directories
return;
}
......
......@@ -135,8 +135,8 @@ export class ExplorerService implements IExplorerService {
return this.editable && this.editable.stat === stat ? this.editable.data : undefined;
}
isEditable(stat: ExplorerItem): boolean {
return !!this.editable && this.editable.stat === stat;
isEditable(stat: ExplorerItem | undefined): boolean {
return !!this.editable && (this.editable.stat === stat || !stat);
}
select(resource: URI, reveal?: boolean): Promise<void> {
......
......@@ -49,7 +49,8 @@ export interface IExplorerService {
setEditable(stat: ExplorerItem, data: IEditableData | null): void;
getEditableData(stat: ExplorerItem): IEditableData | undefined;
isEditable(stat: ExplorerItem): boolean;
// If undefined is passed checks if any element is currently being edited.
isEditable(stat: ExplorerItem | undefined): boolean;
findClosest(resource: URI): ExplorerItem | null;
refresh(): void;
setToCopy(stats: ExplorerItem[], cut: boolean): void;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册