Change:
<!-- Please search existing issues to avoid creating duplicates. --<!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: --<!-- Use Help Report Issue to prefill these. --- VSCode Version: 1.25.0-insider OS Version: Windows 10 Home - 1803 Steps to Reproduce: the Explorer sidebar tab the Outline or File Hierarchy views as if to rearrange them the cursor over an item in the Open Editors view individual editors will change color along with the entire view, making it seem as if you can drop a sidebar view into an open editor and something will happen. What should actually happen is that the view should highlight (since its location will be replaced; it does do this), but the individual items should not be affected. Screenshot: ! I am holding the File Hierarchy view over the file in that screenshot. <!-- Launch with to check. --Does this issue occur when all extensions are disabled?: Yes
I acknowledge the issue, the problem is that the OpenEditor view is not differentiating between drag events PR to fix this is welcome
I was able to add a check to prevent the hover styling unless the item being dragged is another open editor in the list (see ), however this also means that when tabs are dragged over the Open Editors panel (ie, when there's multiple groups; you can drag a tab into a group and it will duplicate into that group), it doesn't have any styling anymore. I couldn't figure out a way to check if the dragged object is a tab. Is that feasible? Where would I look?
yeah it is not so simple You would need to check the dragged data. If there is an elegent solution to fix this please provide a PR. If too complex or computation intensive I would prefer to leave the issue open for now. Thanks
So just to make sure, the only things that should trigger the class on open editors are the open tabs and the other open editors in the list, correct?
no. Dragging resources from the explorer, adn dragging things outside of vscode should also trigger it

Discussion:
import { IMenuService, MenuId, IMenu } from 'vs/platform/actions/common/actions'; import { DirtyEditorContext, OpenEditorsGroupContext } from 'vs/workbench/parts/files/electron-browser/fileCommands'; import { ResourceContextKey } from 'vs/workbench/common/resources'; <del> import { fillResourceDataTransfers, ResourcesDropHandler, LocalSelectionTransfer } from 'vs/workbench/browser/dnd'; </del> <ins> import { fillResourceDataTransfers, ResourcesDropHandler, LocalSelectionTransfer, CodeDataTransfers } from 'vs/workbench/browser/dnd'; </ins> import { ViewletPanel, IViewletPanelOptions } from 'vs/workbench/browser/parts/views/panelViewlet'; import { IViewletViewOptions } from 'vs/workbench/browser/parts/views/viewsViewlet';

} } <ins> /** * Check if the item being dragged is one of the supported types that can be dropped on an * open editor or editor group. Fixes https://github.com/Microsoft/vscode/issues/52344. * @param e * @returns true if dropping is supported. */ function dropOnEditorSupported(e: DragEvent): boolean { // DataTransfer types are automatically converted to lower case, except Files. const supportedTransferTypes = { openEditor: CodeDataTransfers.EDITORS.toLowerCase(), externalFile: 'Files', codeFile: CodeDataTransfers.FILES.toLowerCase() }; if ( e.dataTransfer.types.indexOf(supportedTransferTypes.openEditor) !== -1 || e.dataTransfer.types.indexOf(supportedTransferTypes.externalFile) !== -1 || // All Code files should already register as normal files, but just to be safe: e.dataTransfer.types.indexOf(supportedTransferTypes.codeFile) !== -1 ) { return true; } else { return false; } } </ins> class EditorGroupRenderer implements IRenderer<IEditorGroup, IEditorGroupTemplateData> { static readonly ID = 'editorgroup';

editorGroupTemplate.actionBar.push(closeGroupAction, { icon: true, label: false, keybinding: closeGroupActionKey ? closeGroupActionKey.getLabel() : void 0 }); editorGroupTemplate.toDispose = []; <del> editorGroupTemplate.toDispose.push(dom.addDisposableListener(container, dom.EventType.DRAG_OVER, () => { dom.addClass(container, 'focused'); </del> <ins> editorGroupTemplate.toDispose.push(dom.addDisposableListener(container, dom.EventType.DRAG_OVER, (e: DragEvent) => { if (dropOnEditorSupported(e)) { dom.addClass(container, 'focused'); } </ins> })); editorGroupTemplate.toDispose.push(dom.addDisposableListener(container, dom.EventType.DRAG_LEAVE, () => { dom.removeClass(container, 'focused');

this.instantiationService.invokeFunction(fillResourceDataTransfers, dragged.map(d => d.getResource()), e); } })); <del> editorTemplate.toDispose.push(dom.addDisposableListener(container, dom.EventType.DRAG_OVER, () => { dom.addClass(container, 'focused'); </del> <ins> editorTemplate.toDispose.push(dom.addDisposableListener(container, dom.EventType.DRAG_OVER, (e: DragEvent) => { if (dropOnEditorSupported(e)) { dom.addClass(container, 'focused'); } </ins> })); editorTemplate.toDispose.push(dom.addDisposableListener(container, dom.EventType.DRAG_LEAVE, () => { dom.removeClass(container, 'focused');