From f368e01cd9ee305b52f25ac177f6bdb968ec99a5 Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 20 Jul 2016 10:42:04 +0200 Subject: [PATCH] debug: only hide the hover widget if the mouse leave event is outside the hover fixes #3528 --- .../debug/electron-browser/debugEditorContribution.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts b/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts index d2f3602a46a..7fe31f067d8 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts @@ -124,7 +124,13 @@ export class DebugEditorContribution implements debug.IDebugEditorContribution { // hover listeners & hover widget this.toDispose.push(this.editor.onMouseDown((e: editorbrowser.IEditorMouseEvent) => this.onEditorMouseDown(e))); this.toDispose.push(this.editor.onMouseMove((e: editorbrowser.IEditorMouseEvent) => this.onEditorMouseMove(e))); - this.toDispose.push(this.editor.onMouseLeave((e: editorbrowser.IEditorMouseEvent) => this.hoverWidget.hide())); + this.toDispose.push(this.editor.onMouseLeave((e: editorbrowser.IEditorMouseEvent) => { + const rect = this.hoverWidget.getDomNode().getBoundingClientRect(); + // Only hide the hover widget if the editor mouse leave event is outside the hover widget #3528 + if (e.event.posx < rect.left || e.event.posx > rect.right || e.event.posy < rect.top || e.event.posy > rect.bottom) { + this.hideHoverWidget(); + } + })); this.toDispose.push(this.editor.onKeyDown((e: keyboard.IKeyboardEvent) => this.onKeyDown(e))); this.toDispose.push(this.editor.onDidChangeModel(() => this.hideHoverWidget())); this.toDispose.push(this.editor.onDidScrollChange(() => this.hideHoverWidget));