Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dropdown not scrolling when there's not enough vertical space #7940

Open
wants to merge 1 commit into
base: dev-mail
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/common/gui/base/Dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,10 @@ export class Dropdown implements ModalComponent {

const contents = () => {
const showingIcons = this.children.some((c) => "icon" in c && typeof c.icon !== "undefined")
// We need to set the height to the height of the parent which already has the calculated and measured height, otherwise this element might
// overflow the parent (the overall dropdown container) when there's not enough vertical space to display all items
return m(
".dropdown-content.scroll",
".dropdown-content.scroll.height-100p",
{
class: this.isFilterable ? "abs" : "",
role: AriaRole.Menu,
Expand Down