diff --git a/src/vs/workbench/browser/parts/editor/sideBySideEditorControl.ts b/src/vs/workbench/browser/parts/editor/sideBySideEditorControl.ts index 6931fd531f1..5505a0b0b71 100644 --- a/src/vs/workbench/browser/parts/editor/sideBySideEditorControl.ts +++ b/src/vs/workbench/browser/parts/editor/sideBySideEditorControl.ts @@ -1014,7 +1014,7 @@ export class SideBySideEditorControl implements ISideBySideEditorControl, IVerti overlay.once(DOM.EventType.MOUSE_OVER, () => { setTimeout(() => { cleanUp(); - }, 100); + }, 300); }); } }); diff --git a/src/vs/workbench/electron-browser/window.ts b/src/vs/workbench/electron-browser/window.ts index c894c8f4b55..8df2e2a6889 100644 --- a/src/vs/workbench/electron-browser/window.ts +++ b/src/vs/workbench/electron-browser/window.ts @@ -110,6 +110,18 @@ export class ElectronWindow { }) .on([DOM.EventType.DRAG_LEAVE, DOM.EventType.DRAG_END], () => { cleanUp(); + }).once(DOM.EventType.MOUSE_OVER, () => { + // Under some circumstances we have seen reports where the drop overlay is not being + // cleaned up and as such the editor area remains under the overlay so that you cannot + // type into the editor anymore. This seems related to using VMs and DND via host and + // guest OS, though some users also saw it without VMs. + // To protect against this issue we always destroy the overlay as soon as we detect a + // mouse event over it. The delay is used to guarantee we are not interfering with the + // actual DROP event that can also trigger a mouse over event. + // See also: https://github.com/Microsoft/vscode/issues/10970 + setTimeout(() => { + cleanUp(); + }, 300); }); } }