@trudb/tru-common-lib 0.2.90 → 0.2.91

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
  });
@@ -8439,24 +8445,17 @@ class TruDesktopWindowStateMonitor {
8439
8445
  this.focusAppropriateElement(event);
8440
8446
  }
8441
8447
  else {
8442
- event.preventDefault();
8448
+ let overlayElement = this.overlayContainer.getContainerElement();
8449
+ if (!(overlayElement.childElementCount > 0))
8450
+ event.preventDefault();
8443
8451
  }
8444
8452
  }
8445
8453
  }
8446
8454
  onFocusIn(event) {
8447
8455
  if (this.active) {
8448
8456
  let overlayElement = this.overlayContainer.getContainerElement();
8449
- if (overlayElement.childElementCount > 0) {
8450
- let rootElement = document.querySelector('app-root');
8451
- if (rootElement)
8452
- rootElement.setAttribute('inert', '');
8457
+ if (overlayElement.childElementCount > 0)
8453
8458
  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
8459
  setTimeout(() => {
8461
8460
  let target = event.target;
8462
8461
  this.focusableElements = this.getFocusableChildElements();