mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
Use focus tracker (fixes #53867)
This commit is contained in:
parent
bcfc2b8119
commit
364c454e9c
|
@ -834,16 +834,9 @@ export class QuickInputService extends Component implements IQuickInputService {
|
|||
}, 0);
|
||||
}));
|
||||
|
||||
this._register(dom.addDisposableListener(container, 'focusout', (e: FocusEvent) => {
|
||||
if (e.relatedTarget === container) {
|
||||
(<HTMLElement>e.target).focus();
|
||||
return;
|
||||
}
|
||||
for (let element = <Element>e.relatedTarget; element; element = element.parentElement) {
|
||||
if (element === container) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
const focusTracker = dom.trackFocus(container);
|
||||
this._register(focusTracker);
|
||||
this._register(focusTracker.onDidBlur(() => {
|
||||
if (!this.ui.ignoreFocusOut && !this.environmentService.args['sticky-quickopen'] && this.configurationService.getValue(CLOSE_ON_FOCUS_LOST_CONFIG)) {
|
||||
this.hide(true);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue