@annalib/anna-core 35.3.0 → 35.3.1

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.
@@ -570,7 +570,15 @@ class ShowEllipsisTextOnHoverDirective {
570
570
  }
571
571
  onMouseEnter() {
572
572
  const domElement = this.elementRef.nativeElement;
573
- if (domElement.offsetWidth < domElement.scrollWidth || this.checkPositionsInDecimals(domElement)) {
573
+ const clone = document.createElement('span');
574
+ clone.style.visibility = 'hidden';
575
+ clone.style.whiteSpace = 'nowrap';
576
+ clone.style.position = 'absolute';
577
+ clone.style.font = window?.getComputedStyle(domElement)?.font;
578
+ clone.textContent = domElement.textContent;
579
+ document.body.appendChild(clone);
580
+ const fullWidth = clone.offsetWidth;
581
+ if (domElement.offsetWidth < domElement.scrollWidth || this.checkPositionsInDecimals(domElement) || fullWidth > domElement.offsetWidth) {
574
582
  domElement.title = domElement.textContent === "" ? domElement.value : domElement.textContent;
575
583
  }
576
584
  else if (domElement.title)