Check the active element also when 'focusin' or 'focusout' bubble.

This change was initially done only in the editor for microsoft/monaco-editor#2339, but after a discussion we have agreed to bring it to all users of `FocusTracker`.

Co-authored-by: Johannes Rieken <johannes.rieken@gmail.com>
This commit is contained in:
Alex Dima
2021-11-22 14:59:46 +01:00
parent 7be48d527a
commit 9bd899faba
2 changed files with 2 additions and 6 deletions

View File

@@ -978,6 +978,8 @@ class FocusTracker extends Disposable implements IFocusTracker {
this._register(addDisposableListener(element, EventType.FOCUS, onFocus, true));
this._register(addDisposableListener(element, EventType.BLUR, onBlur, true));
this._register(addDisposableListener(element, EventType.FOCUS_IN, () => this._refreshStateHandler()));
this._register(addDisposableListener(element, EventType.FOCUS_OUT, () => this._refreshStateHandler()));
}
refreshState() {