Skip to content

WDropdown will not show menu if there are no other widgets #6341

@uniformization

Description

@uniformization

Describe the bug

If you test the following code below, the dropdown will not open when clicked, the dropdown should open and show the values of the enum.

public class DropdownBugScreen extends WindowScreen {
    public enum ExampleEnum {
        Value1,
        Value2,
        Value3
    }

    public DropdownBugScreen() {
        super(GuiThemes.get(), "DropdownBugScreen");
    }

    @Override
    public void initWidgets() {
        WView view = add(theme.view()).expandX().widget();
        view.add(theme.dropdown(ExampleEnum.Value1));
    }
}

Steps to reproduce

To "fix" is, add this line to the end of the initWidgets function

view.add(theme.button("Select")).expandCellX();

If you use WHorizontalList, the dropdown will not open (even if you include the "fix" above)

Meteor Version

1.21.11-63

Minecraft Version

1.21.11

Operating System

Windows

Before submitting a bug report

  • This bug wasn't already reported (I have searched bug reports on GitHub).

  • This is a valid bug (I am able to reproduce this on the latest dev build).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions