mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Listen to escape key to close nb find widget (#9247)
This commit is contained in:
@@ -161,6 +161,14 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
|
|||||||
|
|
||||||
this._applyTheme(themeService.getTheme());
|
this._applyTheme(themeService.getTheme());
|
||||||
this._register(themeService.onThemeChange(this._applyTheme.bind(this)));
|
this._register(themeService.onThemeChange(this._applyTheme.bind(this)));
|
||||||
|
|
||||||
|
this.onkeyup(this._domNode, e => {
|
||||||
|
if (e.equals(KeyCode.Escape)) {
|
||||||
|
this._state.change({ isRevealed: false, searchScope: null }, false);
|
||||||
|
e.preventDefault();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----- IOverlayWidget API
|
// ----- IOverlayWidget API
|
||||||
|
|||||||
Reference in New Issue
Block a user