mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-14 01:25:37 -05:00
fix the menu not hide issue (#15138)
This commit is contained in:
@@ -60,7 +60,7 @@ export class HeaderFilter<T extends Slick.SlickData> {
|
||||
.subscribe(this.grid.onKeyDown, (e: DOMEvent) => this.handleKeyDown(e as KeyboardEvent));
|
||||
this.grid.setColumns(this.grid.getColumns());
|
||||
|
||||
this.disposableStore.add(addDisposableListener(document.body, 'mousedown', e => this.handleBodyMouseDown(e)));
|
||||
this.disposableStore.add(addDisposableListener(document.body, 'mousedown', e => this.handleBodyMouseDown(e), true));
|
||||
this.disposableStore.add(addDisposableListener(document.body, 'keydown', e => this.handleKeyDown(e)));
|
||||
}
|
||||
|
||||
@@ -80,8 +80,6 @@ export class HeaderFilter<T extends Slick.SlickData> {
|
||||
private handleBodyMouseDown(e: MouseEvent): void {
|
||||
if (this.$menu && this.$menu[0] !== e.target && !jQuery.contains(this.$menu[0], e.target as Element)) {
|
||||
this.hideMenu();
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -528,7 +528,7 @@ export abstract class GridTableBase<T> extends Disposable implements IView {
|
||||
}));
|
||||
if (this.enableFilteringFeature) {
|
||||
this.filterPlugin = new HeaderFilter(this.contextViewService);
|
||||
attachTableFilterStyler(this.filterPlugin, this.themeService);
|
||||
this._register(attachTableFilterStyler(this.filterPlugin, this.themeService));
|
||||
this.table.registerPlugin(this.filterPlugin);
|
||||
}
|
||||
if (this.styles) {
|
||||
|
||||
Reference in New Issue
Block a user