primeng icon indicating copy to clipboard operation
primeng copied to clipboard

Tooltip: Tooltip broken when used in a custom component

Open rosenthalj opened this issue 9 months ago • 0 comments

Describe the bug

Since PrimeNG 17.17.0 the tooltip has been broken when used with a custom component. An exception is thrown in tooltip.ts alignRight method.

The following video demonstrates the issue:

https://github.com/primefaces/primeng/assets/45439491/a14efba1-7c29-46f5-9c75-d39371497c5b

The bug was caused when fixing issue #15390 by change: https://github.com/primefaces/primeng/commit/7ea87413eedede63830304557c7f7fca566eabc5

Environment

windows and mac

Reproducer

https://stackblitz.com/edit/github-a5n4rp?file=src%2Findex.html,src%2Fapp%2Fapp.module.ts,src%2Fapp%2Fapp.component.ts

Angular version

17.x

PrimeNG version

17.17.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.x

Browser(s)

chrome, firefox, and safari

Steps to reproduce the behavior

  1. Run the reproducer: https://stackblitz.com/edit/github-a5n4rp?file=src%2Findex.html,src%2Fapp%2Fapp.module.ts,src%2Fapp%2Fapp.component.ts
  2. Mouse over the "working tooltip" information icon A tooltip will be displayed (good)
  3. Mouse over the "broken tooltip" information icon No tooltip will be displayed and an exception occur in the console (bad)

Expected behavior

tooltip should be displayed when mousing over each of the information icons

rosenthalj avatar May 21 '24 18:05 rosenthalj