-
Notifications
You must be signed in to change notification settings - Fork 11
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
Context menu doesn't close when stopPropagation() is called on a click event. #34
Comments
Hi @Timmeeeey, I just saw your issue, sorry for the delay. Unfortunately, there is little I can do. To close the menu I listen to "document:click", if the event is stopped it never reach the document, thus prevent menu closing. Do you see any workaround ? |
Hi @sroucheray |
Backdrop is not a bad idea, though. |
At one point de native dialog API (https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement) along with anchor positioning https://developer.chrome.com/blog/anchor-positioning-api will be the solution |
@sroucheray |
Describe the bug
When you open a context menu and click somewhere where
stopPropagation()
is called on the click event, then the context menu doesn't close.To Reproduce
Steps to reproduce the behavior:
Expected behavior
The context menu should always close when clicking outside the menu.
Stackblitz Example
https://stackblitz.com/edit/ngx-contextmenu-example-zas2j8
The text was updated successfully, but these errors were encountered: