Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Bug UI Builder input fields lose focus after typing one character

Discussion in 'UI Toolkit' started by manuelgoellnitz, May 24, 2022.

  1. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    366
    This happens since 2022.1.0 (i think):

    When I work with the UI Builder, added Elements and setting their paramters at some point the input fields of the inspector (like Name etc), lose their focus after typing in one character.
    From this point on, all other input fields have the same bug.
    Closing and reopening the UI builder has no effect.

    It goes back to normal, when I uncheck and recheck "UI Toolkit Live Reload".
     
  2. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    366
    The Bug returns every time I add a new visual element to the hierarchy.
     
  3. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    769
    Same bug here using Unity 2021.1.f1!

    It is my first time trying UI Toolkit, and I'm going crazy because I can't set the name of the elements, I can only set one character per time because the input lose the focus. For me, only the input fields from the "Visual Element" tab are running this issue (name, tooltip and view data key inputs), the other inputs still seem to work.

    Unchecking and rechecking "UI Toolkit Live Reload" or also clicking on "Reset UI Builder Layout" make it to work again, but I just set one or two fields and the bug returns.

    For those who don't know where is the "UI Toolkit Live Reload" and "Reset UI Builder Layout", just right-click on the tab of the "UI Builder" window, it will show some options.

    [Edited] Just to say that I'm enjoying using UI Toolkit anyway.
     
    Last edited: May 25, 2022
  4. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    366
    Uh it gets worse:
    When you edit an input field and want to erase the value by presseing "Backspace" multiple times: The first time the character is deleted, then the focus switches and the second time the entire element gets deleted!
     
  5. Chris-Trueman

    Chris-Trueman

    Joined:
    Oct 10, 2014
    Posts:
    1,256
    I am experiencing this same issue with UIBuilder and Unity 20221.0.
     
  6. alcheMikey

    alcheMikey

    Joined:
    Feb 18, 2021
    Posts:
    30
    Also experiencing this with 2022.1.2f1
     
  7. martinpa_unity

    martinpa_unity

    Unity Technologies

    Joined:
    Oct 18, 2017
    Posts:
    370
    Hi!
    I tested using 2022.1.2f1 and could not reproduce the issue. Does it occur after a specific action?
    Thanks!
     
  8. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    366
    Drag a new VisualElement in the hierarchy, then try to change it's name, for example.
     
  9. martinpa_unity

    martinpa_unity

    Unity Technologies

    Joined:
    Oct 18, 2017
    Posts:
    370
    Yeah, that works correctly for me. Can you file a bug with a repro project so that we can take a look at it?
     
  10. DenisLemos

    DenisLemos

    Joined:
    May 1, 2015
    Posts:
    769
    I just update from Unity 2022.1.1 to Unity 2022.1.2f1 and the bug still persist.

    I think this same bug was already reported on this forum.

    From the forum: "This is fixed in 2022.2 and the fix for 2022.1 and 2021.3 are on the way."

    The issue tracker:
    https://issuetracker.unity3d.com/is...builders-inspector-loses-focus-after-an-input

    PS: We can rename a Visual Element by double-clicking on it in the Hierarchy panel instead of using the Inspector, of course, to set Text labels it will still be a problem, but most of the time in my case, I just want to rename the elements for organization porpoises.
     
    manuelgoellnitz likes this.
  11. martinpa_unity

    martinpa_unity

    Unity Technologies

    Joined:
    Oct 18, 2017
    Posts:
    370
    Thanks for the bug link!
    I checked it up quickly and it seems the backport is underway, so it should be available soon in 2022.1.

    Hopefully, it should fix the issues you are having.
     
  12. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    366
    I think it is fixed in 2022.1.3
     
  13. KamilCSPS

    KamilCSPS

    Joined:
    May 21, 2020
    Posts:
    386
    Can you confirm?

    I don't see it in the changelog. Which begs the question of what other fixes have been done that we're not aware of... :confused:
     
  14. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    366
    Now it happened again, so unfortunatelly not fixed :(
     
    Last edited: Jun 3, 2022
    KamilCSPS likes this.
  15. DragonCoder

    DragonCoder

    Joined:
    Jul 3, 2015
    Posts:
    1,493
    Occurs to me in 2022.1.2f on two different computers...
    Any further system-specific information we could provide to help narrow the cause down?
     
  16. ChGuidi

    ChGuidi

    Joined:
    Dec 28, 2021
    Posts:
    105
    I'm on 2022.1.5 and it still occurs. So it's not backported yet :)
     
  17. Randolphjand

    Randolphjand

    Joined:
    Sep 23, 2017
    Posts:
    28
    It happens to me no matter what version of Unity I am using. Has been happening since the first time I tried it. Sometimes I can enter the text normally for one field and then very next field it happens on.
     
    ChGuidi likes this.
  18. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    366
    2022.1.6 still has that bug.

    Please backport it!
    It is so frustrating to work with the UIBuilder with it.
     
    Thimo_ and DragonCoder like this.
  19. Thimo_

    Thimo_

    Joined:
    Aug 26, 2019
    Posts:
    59
    I just upgraded to 2022.1.6 and got this issue myself too. Very very frustrating
     
  20. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    366
    The Fix is in the Release notes of 2022.1.7.
    Fingers crossed!
     
  21. Thimo_

    Thimo_

    Joined:
    Aug 26, 2019
    Posts:
    59
    So far I didn't have the issue yet so that seems promising
     
    ChGuidi and DragonCoder like this.
  22. ChGuidi

    ChGuidi

    Joined:
    Dec 28, 2021
    Posts:
    105
    yes same here :D
     
    Thimo_ likes this.