Search Unity

Delayed Fields breaking custom inspector with Popups

Discussion in 'Editor & General Support' started by BarbaraTheGoodEvil, Jan 26, 2021.

  1. BarbaraTheGoodEvil

    BarbaraTheGoodEvil

    Joined:
    Mar 2, 2018
    Posts:
    4
    Hello,

    we've been having problems with a custom inspector not updating some values on the first try for a while and today I figured out why it's happening. The inspector has some delayed fields and also some popups and whenever the focus is on a delayed field and I then click on a popup to select a new value, that value is not applied.
    The problem seems to be that the popup does not get the focus when I open it but only when I click something in it. This leads to a loss of focus for the delayed field which in turn does an update on focus loss and this seems to overwrite what I choose from the dropdown. -.-
    If you know why it happens you can prevent it by clicking the popups label first but UX wise it's really bad and I can already hear the game designers complaining about it.

    Is there any reason why the popup doesn't get the focus as soon as it's opened? And is there any good way to avoid the problem? Getting rid of the delayed fields is sadly not an option =(

    Any help would be appreciated!