.dropdown-menu have many dropdown-itemsThose 2 simple lines of CSS (without any JS) works like a charm
.dropdown-menu {
overflow-y: auto;
max-height: 80vh;
}
Even if it's not the best solution and still in some cases (large dropdown at the bottom of page but there should be a JS to show dropdown up not down) will fail, for most cases it will work and I think it's a good temporary option until someone will make an issue with his use case.
Why not remove elements from the dropdown menu, or try another design pattern altogether?
Does the page not resize itself to become slightly taller to fit the menu thus allowing access to the rest of the menu items via scrolling the page?
We're hopefully going to integrate Tether with the dropdowns, such that it would flip the direction of the dropdown menu in such cases where the items would otherwise go beyond the viewport.
Closed and fixed by #22444
Most helpful comment
We're hopefully going to integrate Tether with the dropdowns, such that it would flip the direction of the dropdown menu in such cases where the items would otherwise go beyond the viewport.