ContextMenu tied to DataTable always opens no matter where you right click on the page #414
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Table definition:
`<p-contextMenu #cm [model]="items" [global]="false">
I see the following in the ContextMenu ngAfterViewInit lifecycle method:
this.documentRightClickListener = this.renderer.listenGlobal('body', 'contextmenu', (event) => { this.show(event); event.preventDefault(); });
This seems to be registering any context menu created to always show when the body is rightclicked. Maybe when a datatable registers a context menu it can call a method that unregisters this listener? Or if global flag isn't set it doesn't create this listener at all?
The text was updated successfully, but these errors were encountered: