-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
p-confirmPopup errors when setTimeout runs after onContainerDestroy #13034
Comments
…nds up running after the popup has been closed, and the confirmation on the confirmpopup component has already been set to null. Added null checks to the confirmation property. Fixes primefaces#13034
…ethod when the confirmation is null.
When I updated our application to use the 16.0.1 release that included the #13035 pull request, I found another issue that was not happening when I first tested my fixes locally. |
Hi @jacks-bush, Could you please open an issue for that too so I can add it to the milestone |
@cetincakiroglu, |
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: