提交 e82498a5 编写于 作者: R rebornix

Fix #53142. Reset if editor blurs.

上级 34471407
......@@ -54,12 +54,20 @@ export class DragAndDropController implements editorCommon.IEditorContribution {
this._toUnhook.push(this._editor.onMouseDrop((e: IEditorMouseEvent) => this._onEditorMouseDrop(e)));
this._toUnhook.push(this._editor.onKeyDown((e: IKeyboardEvent) => this.onEditorKeyDown(e)));
this._toUnhook.push(this._editor.onKeyUp((e: IKeyboardEvent) => this.onEditorKeyUp(e)));
this._toUnhook.push(this._editor.onDidBlurEditorWidget(() => this.onEditorBlur()));
this._dndDecorationIds = [];
this._mouseDown = false;
this._modiferPressed = false;
this._dragSelection = null;
}
private onEditorBlur() {
this._removeDecoration();
this._dragSelection = null;
this._mouseDown = false;
this._modiferPressed = false;
}
private onEditorKeyDown(e: IKeyboardEvent): void {
if (!this._editor.getConfiguration().dragAndDrop) {
return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册