isaacplmann / ngx-contextmenu

An Angular component to show a context menu on an arbitrary component
MIT License
248 stars 91 forks source link

2nd Right-click contextmenu on the same spot will trigger browser default right-click #86

Closed celestale closed 6 years ago

celestale commented 6 years ago

Hi, I was wondering if this is a bug or not?

I discovered this(maybe not a bug) that when you right-click on the same spot of your first-right-click. the browser context menu will be triggered. Is that the expected behavior?

isaacplmann commented 6 years ago

I believe what is happening is that your first right-click creates the custom context menu. Your second right-click in the same spot is a right-click on the custom context menu which would then trigger the default browser context menu.

What would you expect to happen instead?

celestale commented 6 years ago

Thanks @isaacplmann, what you said make sense. I would actually want the custom contextmenu to close like similar behavior to native. So i have removed the unwanted behavior with oncontextmenu="return false;"