Skip to content
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

TieredMenu with appendTo=body isn't removed #4056

Closed
brunopalaoro opened this issue Sep 28, 2017 · 1 comment
Closed

TieredMenu with appendTo=body isn't removed #4056

brunopalaoro opened this issue Sep 28, 2017 · 1 comment
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@brunopalaoro
Copy link
Contributor

I'm submitting a ...

[ x ] bug report

**Plunkr Case (Bug Reports)**
http://plnkr.co/wGmzrIDMWUujaBMHECbs

**Current behavior**
If a TieredMenu has the propertu attachTo=body, it never gets removed from the dom, because the ngOnDestroy only removes if there's a documentClickListener, and in various case it doen't have.

**Expected behavior**
Remove the menu from the page when it get's destroyed.

**Minimal reproduction of the problem with instructions**
If you have a menu and you go to another route, for instance.
In the plunker I made a call to ngOnDestroy and after it a document.querySelector('.ui-tiered-menu') to show that the menu still in there.

**Please tell us about your environment:**
* **Angular version:** 4.3.6

* **PrimeNG version:** 4.2.0

* **Browser:** [Tested on Chrome and Firefox]
@cagataycivici cagataycivici self-assigned this Oct 2, 2017
@cagataycivici cagataycivici added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Oct 2, 2017
@cagataycivici cagataycivici added this to the 4.2.2 milestone Oct 2, 2017
cagataycivici added a commit that referenced this issue Oct 2, 2017
@cagataycivici
Copy link
Member

Obrigado!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

2 participants