@trudb/tru-common-lib 0.2.50 → 0.2.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8413,21 +8413,19 @@ class TruDesktopWindowStateMonitor {
|
|
|
8413
8413
|
}
|
|
8414
8414
|
onFocusIn(event) {
|
|
8415
8415
|
if (this.active) {
|
|
8416
|
-
|
|
8417
|
-
|
|
8418
|
-
|
|
8419
|
-
|
|
8420
|
-
|
|
8421
|
-
|
|
8422
|
-
}
|
|
8423
|
-
});
|
|
8416
|
+
let target = event.target;
|
|
8417
|
+
this.focusableElements = this.getFocusableChildElements();
|
|
8418
|
+
let firstFocusableElement = this.focusableElements[0];
|
|
8419
|
+
if (target !== null && !this.el.nativeElement.contains(target)) {
|
|
8420
|
+
firstFocusableElement.focus();
|
|
8421
|
+
}
|
|
8424
8422
|
}
|
|
8425
8423
|
}
|
|
8426
8424
|
ngOnChanges(changes) {
|
|
8427
8425
|
this.setWindowState();
|
|
8428
8426
|
if (this.active) {
|
|
8429
8427
|
this.tabListener = this.renderer.listen('document', 'keydown', this.onKeydown.bind(this));
|
|
8430
|
-
this.focusListener = this.renderer.listen('
|
|
8428
|
+
this.focusListener = this.renderer.listen('window', 'focusin', this.onFocusIn.bind(this));
|
|
8431
8429
|
}
|
|
8432
8430
|
else {
|
|
8433
8431
|
if (typeof this.tabListener === 'function')
|