use disposable for text area listeners

This commit is contained in:
Simon Siefke
2024-01-04 22:29:12 +01:00
parent b0667aacca
commit 9e98b631da
+2 -2
View File
@@ -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 {