primefaces / primeui

Rich set of javascript-css only widgets
http://www.primefaces.org/primeui
283 stars 125 forks source link

Context Menu can appear outside the screen #238

Open SuperPat45 opened 8 years ago

SuperPat45 commented 8 years ago

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';