Skip to content

Commit

Permalink
Fix leaks in hoverService
Browse files Browse the repository at this point in the history
Fixes #207454
  • Loading branch information
Tyriar committed Apr 2, 2024
1 parent 32d5ad5 commit 3501dd8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/vs/editor/browser/services/hoverService/hoverService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export class HoverService extends Disposable implements IHoverService {
this._currentHoverOptions = undefined;
}
hoverDisposables.dispose();
});
}, undefined, hoverDisposables);
// Set the container explicitly to enable aux window support
if (!options.container) {
const targetElement = options.target instanceof HTMLElement ? options.target : options.target.targetElements[0];
Expand All @@ -93,7 +93,7 @@ export class HoverService extends Disposable implements IHoverService {
new HoverContextViewDelegate(hover, focus),
options.container
);
hover.onRequestLayout(() => this._contextViewHandler.layout());
hover.onRequestLayout(() => this._contextViewHandler.layout(), undefined, hoverDisposables);
if (options.persistence?.sticky) {
hoverDisposables.add(addDisposableListener(getWindow(options.container).document, EventType.MOUSE_DOWN, e => {
if (!isAncestor(e.target as HTMLElement, hover.domNode)) {
Expand Down

0 comments on commit 3501dd8

Please sign in to comment.