primeui
primeui copied to clipboard
Context Menu can appear outside the screen
The Context Menu can appear outside the screen:
The top css style of the context menu must never be negative because of some menu items are then unavailable in this case.
Workaround:
this.data = ctxMnu.data("primeui-puicontextmenu");
this.data.show(e);
if (parseInt(tthis.data.container[0].style.top) < 0)
this.data.container[0].style.top = '0';
if (parseInt(this.data.container[0].style.left) < 0)
this.data.container[0].style.left = '0';