dhtmlxMenu: Context Menu positioning

Regarding the dhtmlxMenu when used as a Context Menu and attached to a region:

If that region fills to the bottom of the window, instantiating the menu by right-clicking causes the menu to be clipped and scrollbars to appear. The top-left corner of the menu always appears at the cursor position. In most cases, this is correct. But it should be the bottom-left corner in some circumstances (depending on the height of the menu and window.innerHeight).



Could you please provide completed demo to reproduce the issue?

Here is an example.  If you right-click near the bottom of the area you will see that the context menu extends below the client area.  Scroll bars appear, and one must scroll to view the menu.  This makes it difficult to attach the context menu to a tree and allow the user to right-click on a tree node to invoke the options on that node (if that node is near the bottom of the screen).

/Joel Finkel
DemoMenuBug.html.zip (873 Bytes)


You should do the following:
<div id=“area” style=“position:relative; border:1px solid green; background-color:gray; width:800px; height:600px”>

Also “Visible Area” may be interesting for you, here is a demo:
dhtmlx.com/docs/products/dhtmlxM … 5405354000

Setting the position:relative had no effect in either FF or IE.  However, it is very good to learn about the menu.setVisibleArea(), which is exactly what I need, and which solves the issue.