@trudb/tru-common-lib 0.2.90 → 0.2.92

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.
@@ -1123,7 +1123,13 @@ class TruUiNotification {
1123
1123
  maxWidth: "400px",
1124
1124
  data: dialogConfig
1125
1125
  });
1126
+ let rootElement = document.querySelector('app-root');
1127
+ if (rootElement)
1128
+ rootElement.setAttribute('inert', '');
1126
1129
  dialogRef.afterClosed().subscribe(dialogResult => {
1130
+ rootElement = document.querySelector('app-root');
1131
+ if (rootElement)
1132
+ rootElement.removeAttribute('inert');
1127
1133
  resolve(dialogResult);
1128
1134
  });
1129
1135
  });
@@ -8435,7 +8441,8 @@ class TruDesktopWindowStateMonitor {
8435
8441
  };
8436
8442
  onKeydown(event) {
8437
8443
  if (event.key === 'Tab') {
8438
- if (this.active) {
8444
+ let overlayElement = this.overlayContainer.getContainerElement();
8445
+ if (this.active && !(overlayElement.childElementCount > 0)) {
8439
8446
  this.focusAppropriateElement(event);
8440
8447
  }
8441
8448
  else {
@@ -8446,17 +8453,8 @@ class TruDesktopWindowStateMonitor {
8446
8453
  onFocusIn(event) {
8447
8454
  if (this.active) {
8448
8455
  let overlayElement = this.overlayContainer.getContainerElement();
8449
- if (overlayElement.childElementCount > 0) {
8450
- let rootElement = document.querySelector('app-root');
8451
- if (rootElement)
8452
- rootElement.setAttribute('inert', '');
8456
+ if (overlayElement.childElementCount > 0)
8453
8457
  return; // Ignore focus events when overlays are present
8454
- }
8455
- else {
8456
- let rootElement = document.querySelector('app-root');
8457
- if (rootElement)
8458
- rootElement.removeAttribute('inert');
8459
- }
8460
8458
  setTimeout(() => {
8461
8459
  let target = event.target;
8462
8460
  this.focusableElements = this.getFocusableChildElements();