mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-25 00:44:05 +01:00
cancel hide if still hovered
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user