What happened
A UI Toolkit dropdown field that has many choices extends below the visible screen.
This is the first issue, as it should switch to scrolling before that and keep the list shorter by default.
But there are also situations when a developer wants to keep the list even shorter by choice.
However, setting the max-height property is not respected as it is overwritten by an internal script.
Styling only the child elements leaves the border.
Styling the parent element has no effect.
Modifications are severely limited in general as the choices list is drawn on a separate VisualElement outside of the hierarchy that gets generated during runtime.
How can we reproduce it using the example you attached
Run the SampleScene.
Try to select Entry 25.
Try to limit the height of the expanded dropdown by writing something in Stylesheet.uss.
Bug report sent:
What happened A UI Toolkit dropdown field that has many choices extends below the visible screen. This is the first issue, as it should switch to scrolling before that and keep the list shorter by default. But there are also situations when a developer wants to keep the list even shorter by choice. However, setting the max-height property is not respected as it is overwritten by an internal script. Styling only the child elements leaves the border. Styling the parent element has no effect. Modifications are severely limited in general as the choices list is drawn on a separate VisualElement outside of the hierarchy that gets generated during runtime.
How can we reproduce it using the example you attached