PerfectMemory / ngx-contextmenu

A context menu component for Angular
https://perfectmemory.github.io/ngx-contextmenu
MIT License
42 stars 12 forks source link

Unlimited submenus on click #35

Closed quicknaps closed 7 months ago

quicknaps commented 8 months ago

Describe the bug When clicking on a submenu a new sub menu opens every time overlaying the old sub menu.

This bug can be reproduced on the demo too.

On the demo, right click to open a context menu. Then click on Special pasties.... Every single time Special pasties is clicked a new sub menu is created.

To Reproduce Steps to reproduce the behavior:

  1. Go to the demo.
  2. Right click on When you right click on this text, a context menu will appear.
  3. Click multiple times on Special pasties....
  4. Voila, multiple submenus have been created. You can check it in DevTools too.

Expected behavior Old submenus will close when opening a new one.

Stackblitz Example The demo is capable of reproducing the bug.

Here's a video of the issue. context-menu.webm

sroucheray commented 8 months ago

Good catch @quicknaps and thanks for the report ! Do you want to provide a fix ? I willing to accept PRs. If not I will try later on to fix the it.

sroucheray commented 7 months ago

Fixed in 17.0.2

quicknaps commented 7 months ago

Sorry for not replying earlier. Thank you for the quick fix! :)