From 9e98b631da085b099af25634bca7100d35162806 Mon Sep 17 00:00:00 2001 From: Simon Siefke Date: Thu, 4 Jan 2024 22:29:12 +0100 Subject: [PATCH] use disposable for text area listeners --- src/browser/services/CoreBrowserService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/browser/services/CoreBrowserService.ts b/src/browser/services/CoreBrowserService.ts index 9999ceec..8a400ffd 100644 --- a/src/browser/services/CoreBrowserService.ts +++ b/src/browser/services/CoreBrowserService.ts @@ -31,8 +31,8 @@ export class CoreBrowserService extends Disposable implements ICoreBrowserServic this.register(this.onWindowChange((w) => this._screenDprMonitor.setWindow(w))); this.register(forwardEvent(this._screenDprMonitor.onDprChange, this._onDprChange)); - this._textarea.addEventListener("focus", () => (this._isFocused = true)); - this._textarea.addEventListener("blur", () => (this._isFocused = false)); + this.register(addDisposableDomListener(this._textarea, 'focus', () => (this._isFocused = true))) + this.register(addDisposableDomListener(this._textarea, 'blur', () => (this._isFocused = false))) } public get window(): Window & typeof globalThis {