cancel hide if still hovered

This commit is contained in:
Itamar Kestenbaum
2019-08-02 07:11:45 -04:00
parent 1e3cc1a30d
commit f23f00bbb9
2 changed files with 9 additions and 1 deletions
@@ -385,7 +385,11 @@ export class DebugEditorContribution implements IDebugEditorContribution {
@memoize
private get hideHoverScheduler(): RunOnceScheduler {
const scheduler = new RunOnceScheduler(() => this.hoverWidget.hide(), 2 * HOVER_DELAY);
const scheduler = new RunOnceScheduler(() => {
if (!this.hoverWidget.isHovered()) {
this.hoverWidget.hide();
}
}, 2 * HOVER_DELAY);
this.toDispose.push(scheduler);
return scheduler;
@@ -122,6 +122,10 @@ export class DebugHoverWidget implements IContentWidget {
}));
}
isHovered(): boolean {
return this.domNode.matches(':hover');
}
isVisible(): boolean {
return this._isVisible;
}