mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 04:49:35 +00:00
Merge pull request #186504 from microsoft/merogge/listener-disp
on hide of accessibility help, dispose of key listener
This commit is contained in:
commit
b3f5ca2d44
|
@ -60,6 +60,7 @@ class AccessibleView extends Disposable {
|
|||
private _editorWidget: CodeEditorWidget;
|
||||
get editorWidget() { return this._editorWidget; }
|
||||
private _editorContainer: HTMLElement;
|
||||
private _keyListener: IDisposable | undefined;
|
||||
|
||||
constructor(
|
||||
@IOpenerService private readonly _openerService: IOpenerService,
|
||||
|
@ -98,6 +99,7 @@ class AccessibleView extends Disposable {
|
|||
},
|
||||
onHide: () => {
|
||||
provider.onClose();
|
||||
this._keyListener?.dispose();
|
||||
}
|
||||
};
|
||||
this._contextViewService.showContextView(delegate);
|
||||
|
@ -123,7 +125,7 @@ class AccessibleView extends Disposable {
|
|||
model.setLanguage(provider.options.language);
|
||||
}
|
||||
container.appendChild(this._editorContainer);
|
||||
this._register(this._editorWidget.onKeyUp((e) => {
|
||||
this._keyListener = this._register(this._editorWidget.onKeyUp((e) => {
|
||||
if (e.keyCode === KeyCode.Escape) {
|
||||
this._contextViewService.hideContextView();
|
||||
} else if (e.keyCode === KeyCode.KeyD && this._configurationService.getValue(settingKey)) {
|
||||
|
|
Loading…
Reference in a new issue