p-confirmPopup errors when setTimeout runs after onContainerDestroy #13034
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Describe the bug
In the p-confirmPopup, there are a few listeners that get set up in a setTimeout that gets called when the popup is first opened. If, for some reason, that setTimeout does not get called before the popup is closed, which sets
this.confirmation = null
on the component, the component throws a bunch of errors in places where it is expectingthis.confirmation
to be defined.The most common case we are seeing in our app is that
this.confirmation
is null whenbindScrollListener()
is called from the setTimeout.Environment
Versions below.
Reproducer
No response
Angular version
14.2.5
PrimeNG version
14.1.2
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
16.14.0
Browser(s)
Chrome and Firefox, didn't test the others
Steps to reproduce the behavior
I was unable to reproduce this in a stackblitz, but I can reproduce in our app consistently. What happens is as follows:
bindScrollListener()
in the confirm popup component, becausethis.confirmation
is null.Expected behavior
No response
The text was updated successfully, but these errors were encountered: