ContextMenu with a lot of options - scroll needed


#1

Hello,

There is snippet: https://snippet.dhtmlx.com/s7k859cr

If you open context menu by click on the top of clickable area, and expand options of Add, then scrollbar is added to the document. If you click on the bottom and expand options of Add button, then first options are not visible at all.

I think there is needed to adjust positions of context menu, define maxHeight and make it scrollable.


#2

You may use the following css:

<style>
    .dhx_menu{
        max-height:250px;
        overflow:auto
    }
</style>

Here is the example:
https://snippet.dhtmlx.com/23vlml3u


#3

I can do it, but I suggest to fix it in sources because it is not difficult to fix. Fix in source script will make that developer won’t be obligated to fix it himself in every place where problem occurs. Sometimes lists of options are dynamic and I think that is expected to work well always without custom fixes and now if you want to use context menu with a lot of options you have to fix it yourself each time.