workaround for #10970

This commit is contained in:
Benjamin Pasero
2016-08-26 12:16:02 +02:00
parent ac395836b4
commit d61a28e32f
2 changed files with 13 additions and 1 deletions

View File

@@ -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);
});
}
}