DropdownField options popup missing

This is a long shot but maybe someone stumbled upon a similar case.
I have several runtime UI documents and after upgrading unity from 2021.3.4 to 2022.1.19 all of my dropdowns stopped showing options popup.

There were no changes to the documents or styles whatsoever besides upgrading. The rest of the UI works just fine, buttons with hovers reacting to presses, etc.

I also cleared all global CSS, the dropdown options menu is working just fine when previewing in UI Builder but just won’t show in the runtime.

I’ve tried on an empty project with sample content from the asset store and didn’t have any issues with that, so there must be something in my project, but I don’t know what could cause during upgrading the unity version.

It is known issue and Unity said it will be fixed in 2022.2. Sadly, the fix will not be backported to 2022.1.

oh crap, this is bat shit crazy. It requires a lot of effort to break such basic functionality I guess. Anyway, big thanks @Kichang-Kim for letting me know :slight_smile:

sorry for bringing it up again, but judging by the comments on the issue tracker page it is important for at least some of us.

Could you please take a look @benoitd_unity @antoine-unity ?

For me at least, you can open the popup by focusing the field and pressing enter. Hardly ideal but does let you use your UI while waiting for the fix.

yeah, I figured that out, but it isn’t a reliable workaround even. Thanks tho!

You can use this code to open the dropdown field:

            var elem = root.focusController.focusedElement;
            if (elem == null)
            {
                return;
            }
            if (elem is DropdownField)
            {
                var ev = KeyDownEvent.GetPooled(default(char), KeyCode.KeypadEnter, EventModifiers.None);
                elem.SendEvent(ev);
            }

Bind this to an InputAction and you’re done, that’s what I use to make it work with gamepad.

Thanks. I tried something similar but couldn’t work out how to send the correct event.