primeng
primeng copied to clipboard
Tooltip: Tooltip broken when used in a custom component
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
- Run the reproducer: https://stackblitz.com/edit/github-a5n4rp?file=src%2Findex.html,src%2Fapp%2Fapp.module.ts,src%2Fapp%2Fapp.component.ts
- Mouse over the "working tooltip" information icon A tooltip will be displayed (good)
- 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