sidebar causes javascript error if modal=false #10813
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
If you have a PrimeNG PRO Support subscription please post your issue at;
https://pro.primefaces.org
where our team will respond within 4 business hours.
If you do not have a PrimeNG PRO Support subscription, fill-in the report below. Please note that
your issue will be added to the waiting list of community issues and will be reviewed on a first-come first-serve basis, as a result, the support team is unable to guarantee a specific schedule on when it will be reviewed. Thank you for your understanding.
Current Queue Time for Review
Without PRO Support: ~8-12 weeks.
With PRO Support: 1 hour
I'm submitting a ... (check one with "x")
Plunkr Case (Bug Reports)
Please demonstrate your case at stackblitz by using the issue template below. Issues without a test case have much less possibility to be reviewd in detail and assisted.
https://stackblitz.com/github/primefaces/primeng-issue-template
Current behavior
Sidebar - ngOnDestroy() calls destroyModal() which causes error "Failed to execute 'removeChild' on 'Node': parameter 1 is not of type 'Node'".
SPECIFIC CONDITION - input parameter "modal" is set to false. As a result. enableModality() will NOT be called, and therefore "this.mask" will be null.
Expected behavior
No javascript error.
Minimal reproduction of the problem with instructions
Set input parameter "modal" to false. Make sidebar visible. Cause page transition that results in ngOnDestroy() to be called.
Need to check if "this.mask" before attempting to call removeChild().
Broken as part of commit for: #10639
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
PrimeNG version: 5.X
12.2.1
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
Language: [all | TypeScript X.X | ES6/7 | ES5]
Node (for AoT issues):
node --version
=The text was updated successfully, but these errors were encountered: