Skip to content

Commit 9e893bf

Browse files
authored
Ensure event handler is bound to the right context (#9705)
* Ensure event handler is bound to the right context * News * Oops
1 parent eb5312e commit 9e893bf

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

news/2 Fixes/9539.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Ensure event handler is bound to the right context.

src/client/datascience/interactive-common/interactiveBase.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1100,7 +1100,7 @@ export abstract class InteractiveBase extends WebViewHost<IInteractiveWindowMapp
11001100
}
11011101
};
11021102
this._notebook.onSessionStatusChanged(statusChangeHandler);
1103-
this._notebook.onKernelChanged(this.kernelChangeHandler);
1103+
this.disposables.push(this._notebook.onKernelChanged(this.kernelChangeHandler, this));
11041104
}
11051105

11061106
traceInfo('Connected to jupyter server.');

0 commit comments

Comments
 (0)