@db-ux/ngx-core-components 3.0.2 → 3.0.4-playwright-visual-regression2-5008387

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.
@@ -2530,9 +2530,14 @@ class DBTooltip {
2530
2530
  return parent;
2531
2531
  }
2532
2532
  handleAutoPlacement(parent) {
2533
- if (!parent)
2533
+ if (!parent || !this._ref()?.nativeElement)
2534
2534
  return;
2535
- if (this._ref()?.nativeElement) {
2535
+ // Check if CSS Anchor Positioning API is supported
2536
+ const supportsAnchorPositioning = typeof window !== "undefined" &&
2537
+ CSS.supports("anchor-name", "--anchor") &&
2538
+ CSS.supports("position-anchor", "--anchor");
2539
+ // Fallback to existing JavaScript implementation
2540
+ if (!supportsAnchorPositioning) {
2536
2541
  // This is a workaround for angular
2537
2542
  delay(() => {
2538
2543
  handleFixedPopover(this._ref()?.nativeElement, parent, this.placement() ?? "bottom");