menuHeight: "auto" should subtract the header height and other externalities when computing the max height
CarLuva opened this issue · comments
What is the current behavior?
If you set menuHeight
to "auto" when the number of options is large, the menu (with header) will be taller than the inner height of the window, resulting in adding a scrollbar to the document body.
What is the expected behavior?
The menu should not exceed the inner height of the window, so that a scrollbar is not added. I believe the problem is that, in _setMenuHeight()
, there is no adjustment made for the height of the header. Thus it will allow the height of $checkboxes
to reach the full height of the window; the header (plus any top and bottom margin/padding/borders on the surrounding div
) is added to the top of this, it makes the overall height of the menu exceed the height of the window.