Search Unity

Feature Request DropdownField runtime - limit popup to screen

Discussion in 'UI Toolkit' started by rimisaby, Sep 8, 2021.

  1. rimisaby

    rimisaby

    Joined:
    Nov 21, 2016
    Posts:
    9
    Hi there,

    I'm using a dropdown in the status bar of my application (lower edge of the screen). The popup currently always opens below the dropdown field, outside of the visible screen area.

    I have implemented a nasty hack that moves the popup's VisualElement (unity-base-dropdown__container-outer) above the dropdown field, which is not easy due to the variable size of my list and due to the lack of ability to listen to an event that is triggered when a dropdown is about to open. It works but I would prefer to get rid of my workaround and be able to choose per parameter, if the DropdownField should open the popup field above or below.

    In EditorMode it is not a problem, the popup is always limited to the window, in runtime there is no such mechanism.
     
  2. AlexandreT-unity

    AlexandreT-unity

    Unity Technologies

    Joined:
    Feb 1, 2018
    Posts:
    191
    The behaviour you describe makes no sense, so it's probably a bug. Could you submit a quick repro through the bug reporter? Go to Help > Report a bug... . Please add the URL of this thread to the case and post the case number here so we can follow up properly. Thanks!
     
  3. rimisaby

    rimisaby

    Joined:
    Nov 21, 2016
    Posts:
    9
    Filed a bug report. The case number is 1365095. Thanks.
     
    AlexandreT-unity likes this.
  4. rimisaby

    rimisaby

    Joined:
    Nov 21, 2016
    Posts:
    9
unityunity