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. Dismiss Notice

Bug Scroll position resets when using slider dragger in 2022.1

Discussion in 'UI Toolkit' started by pawelduda, Jul 22, 2022.

  1. pawelduda

    pawelduda

    Joined:
    Feb 1, 2019
    Posts:
    45
    Unity 2022.1 has a bug that resets ScrollView position. To reproduce this issue place a Slider inside a ScrollView in a position, that requires scrolling down. When sliders dragger is used to change slider value, ScrollView scroll position resets. This is really annoying.

    I've submitted a bug report, but does anyone know a workaround for this issue? Maybe there is a simple fix.
     
    _geo__, pokelocos, oobartez and 2 others like this.
  2. FaithlessOne

    FaithlessOne

    Joined:
    Jun 19, 2017
    Posts:
    259
    I also came across this bug today. It is clearly reproducable in Unity 2021.3.6.

    In my project it also occurs in other situations for example sometimes when clicking buttons (but not always) or always when draging/moving VisualElements.

    Found no workaround so far.
     
    pokelocos likes this.
  3. ldaughtry

    ldaughtry

    Joined:
    Oct 30, 2012
    Posts:
    38
  4. oobartez

    oobartez

    Joined:
    Oct 12, 2016
    Posts:
    160
    This bug is forcing us to downgrade our project to Unity 2021.3, because all scrollbars exhibit this behavior. To reproduce:
    1. Place any input such as a slider, an input field or a button inside a scroll view.
    2. Run the project.
    3. Scroll down.
    4. Click and drag any of the elements in the scroll view.

    As a result the scroll will jump up to zero.

    What it means in practice is that for example in our game settings panel, when someone scrolls down to volume controls and drags a volume slider, the settings panel scrolls up. So the settings panel is currently unusable.

    @benoitd_unity This appears to be a critical bug. Is there any chance you would be able to release a hotfix soon?
     
  5. Maverick

    Maverick

    Joined:
    Dec 18, 2009
    Posts:
    225
    I can confirm it as well.

    @pawelduda , could you please share bug report reference, so we could follow it?
     
  6. pawelduda

    pawelduda

    Joined:
    Feb 1, 2019
    Posts:
    45
    Sadly I didn't receive one yet. As soon as Unity provide me with one, I will post it here.
     
    pokelocos likes this.
  7. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    365
  8. pawelduda

    pawelduda

    Joined:
    Feb 1, 2019
    Posts:
    45
  9. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    365
    No I am stuck on 2022.1.6 because of this bug.
     
  10. HugoBD-Unity

    HugoBD-Unity

    Unity Technologies

    Joined:
    May 14, 2018
    Posts:
    440
    Hi all! We are deeply sorry for the trouble this caused. We have a PR that contains fixes for the aforementioned bugs and more and it will be backported to 2022.1. We are actively working on it so it can land in the shortest amount of time.

    Here are some of the fixes contained in the PR:
    • Fix vertical scroll bar not working with text fields
    • UUM-8427: TextField scrolls up when highlighting text at the bottom of the TextField
    • Fix shift+tab not working on Mac
    • Fix last character of wrapped line not selected in text field
    • Fix caret in disappearing depending on Reference DPI
     
    oobartez likes this.
  11. FaithlessOne

    FaithlessOne

    Joined:
    Jun 19, 2017
    Posts:
    259
    This major bug is still reproducable in the latest Unity LTS release 2021.3.9. I created a bug report. Sadly it seems this bug has to be reported for every Unity version separately to get fixed.
     
  12. oobartez

    oobartez

    Joined:
    Oct 12, 2016
    Posts:
    160
    @HugoBD-Unity @benoitd_unity Is there any progress on backporting those fixes to 2022.1?

    Our game is stuck on Unity 2022.1.6 and we haven't been able to upgrade since June because the scroll bug makes all of UI Toolkit unusable in any of the newer versions. Because of that we are also stuck with multiple other bugs that were already fixed in July and August.
     
  13. oobartez

    oobartez

    Joined:
    Oct 12, 2016
    Posts:
    160
    For the record, the bug does not apply only to text fields. It also affects other elements, for example sliders. So in practice any game that uses UI Toolkit and scrollbars is unable to upgrade beyond 2022.1.6.
     
    Last edited: Sep 2, 2022
    FaithlessOne likes this.
  14. bk_mechanistry

    bk_mechanistry

    Joined:
    May 5, 2022
    Posts:
    2
    @HugoBD-Unity
    Is there any chance this bug will be fixed soon - seems to be quite a critical one?
    It blocks us from migrating to any newer version of Unity (we're stuck at 2021.1.6), because it breaks essential UI interaction and makes the game unplayable.
     
  15. ldaughtry

    ldaughtry

    Joined:
    Oct 30, 2012
    Posts:
    38
  16. FaithlessOne

    FaithlessOne

    Joined:
    Jun 19, 2017
    Posts:
    259
  17. HugoBD-Unity

    HugoBD-Unity

    Unity Technologies

    Joined:
    May 14, 2018
    Posts:
    440
    The fixes for the issues mentioned above have landed in 2023.1. So far, they have been backported to 2022.2 and 2022.1 and they should land shortly.
     
  18. HugoBD-Unity

    HugoBD-Unity

    Unity Technologies

    Joined:
    May 14, 2018
    Posts:
    440
    @oobartez
    As far as I know, the issues fixed and being backported are specific to the TextField. It could be a different issue. Could you report a bug and report back the case number?
     
  19. HugoBD-Unity

    HugoBD-Unity

    Unity Technologies

    Joined:
    May 14, 2018
    Posts:
    440
    @FaithlessOne UUM-10441 is a different issue that won't be backported with the above fixes. The bug is fixed and is in the process of being backported
     
  20. VoltaDev

    VoltaDev

    Joined:
    Apr 13, 2021
    Posts:
    4
    Hi @HugoBD-Unity , any idea when that specific bug with sliders will be fixed and backported?
     
  21. Timboc

    Timboc

    Joined:
    Jun 22, 2015
    Posts:
    234
    Just wanted to chime in and say that this is also blocking our release after our recent upgrade from 2021 to 2022. A backport to at least 2022.2 as soon as possible would be greatly appreciated.
     
  22. JesusGonzalezRodriguez

    JesusGonzalezRodriguez

    Joined:
    Feb 18, 2022
    Posts:
    14
    Has someone found a workaround for this bug? It seems that the fix is still not rolled out
     
  23. griendeau_unity

    griendeau_unity

    Unity Technologies

    Joined:
    Aug 25, 2020
    Posts:
    230
    Hi, the fix is on it's way to 2023.1 and shouldn't take too long to land in 2022.2 after that. Sorry for the delays! It has very high priority as no easy workaround exist at the moment.
     
    HugoBD-Unity likes this.
  24. pawelduda

    pawelduda

    Joined:
    Feb 1, 2019
    Posts:
    45
  25. griendeau_unity

    griendeau_unity

    Unity Technologies

    Joined:
    Aug 25, 2020
    Posts:
    230
    Since 2022.2 is going to be officially supported pretty soon, I don't think we'll backport this one to 2022.1. I'll bring that up to the team to be sure and get back to you.
     
  26. griendeau_unity

    griendeau_unity

    Unity Technologies

    Joined:
    Aug 25, 2020
    Posts:
    230
    FYI, we reopened the backport for 2022.1 :)
     
    _geo__ likes this.
  27. oobartez

    oobartez

    Joined:
    Oct 12, 2016
    Posts:
    160
  28. FaithlessOne

    FaithlessOne

    Joined:
    Jun 19, 2017
    Posts:
    259
    What about Unity 2021.3 LTS? You will backport the fix to that version, too, don't you?
     
  29. griendeau_unity

    griendeau_unity

    Unity Technologies

    Joined:
    Aug 25, 2020
    Posts:
    230
    Absolutely! That one was never closed
     
    FaithlessOne likes this.
  30. Eldirfar

    Eldirfar

    Joined:
    Feb 9, 2014
    Posts:
    58
    When we can expect this fix in Unity 2021 LTS?
     
    AlceoMazza likes this.
  31. Timboc

    Timboc

    Joined:
    Jun 22, 2015
    Posts:
    234
    VoltaDev likes this.
  32. ChGuidi

    ChGuidi

    Joined:
    Dec 28, 2021
    Posts:
    105
    It would be very interesting for us if this could be backported to 2022.1 :)
     
  33. FaithlessOne

    FaithlessOne

    Joined:
    Jun 19, 2017
    Posts:
    259
    Finally the bug has also been fixed in Unity 2021.3.13:
    https://unity3d.com/unity/whats-new/2021.3.13

    Tested it in my project and can confirm the fix.
     
  34. oobartez

    oobartez

    Joined:
    Oct 12, 2016
    Posts:
    160
    We just tested 2022.1.22f1 and the bug appears to be gone! We can finally upgrade Unity for the first time since June.
     
  35. pokelocos

    pokelocos

    Joined:
    Nov 9, 2015
    Posts:
    54
    Fixed on 2022.0
     
  36. paolo-rebelpug

    paolo-rebelpug

    Joined:
    Sep 27, 2021
    Posts:
    22
    Any idea on when is going to be fixed on the current LTS? I imagine it should be backported.

    EDIT: Solved in the latest LTS 2021.3.16f1
     
    Last edited: Jan 13, 2023
  37. _geo__

    _geo__

    Joined:
    Feb 26, 2014
    Posts:
    1,115
    Any news on it being backported to 2022.1. and 2022.2. ?

    As an Asset Developer supporting 2021.2+ telling my customers to upgrade their projects is not an option (they don't). Scroll views resetting if a slider is used is not a minor bug. Please backport this.
     
  38. antoine-unity

    antoine-unity

    Unity Technologies

    Joined:
    Sep 10, 2015
    Posts:
    733
    According to the issue tracker: "Fixed in 2021.3.13f1, 2022.1.22f1, 2022.2.0b10, 2023.1.0a16".

    Are you still observing this issue with the latest versions of each release stream?
     
    _geo__ likes this.
  39. _geo__

    _geo__

    Joined:
    Feb 26, 2014
    Posts:
    1,115
    Thank you for the info.
    2021.2 works but for example 2022.2.16 doesn't. According to your infos it shouldn't, so that's fine from a logical standpoint). I guess I'll have to educate users on which minor version to use (upgrade).

    Still not a nice scenario because typically asset devs are blamed if anything does not work. And the general expectation is that if it works in the last release of a lower major version (2021 in this case) then people tend to expect it to work in all subsequent major versions. Which is logical I think. It's hard to communicate this to users.
     
  40. slightly_reckless

    slightly_reckless

    Joined:
    Jan 5, 2023
    Posts:
    1
    I
    I am still seeing this bug in 2021.3.2f1. Any update on a work around/time frame for a bug fix for this version?

    Edit: Also seeing this in 2021.23f1 which is the latest version of 2021.3
     
    Last edited: Apr 27, 2023
  41. OlegNewcomer

    OlegNewcomer

    Joined:
    Feb 5, 2020
    Posts:
    3
    The problem is in 2021.3.11f1
    I can't scroll dragging the game objects with attached slider component that are inside the content in play mode, but can scroll dragging the content not touching game objects inside it.
     
  42. FaithlessOne

    FaithlessOne

    Joined:
    Jun 19, 2017
    Posts:
    259
    As stated in a post above the bug has been fixed in Unity 2021.3.13, so it is highly recommended to update to the latest Unity 2021.3 version which currently is 2021.3.28.
     
  43. OlegNewcomer

    OlegNewcomer

    Joined:
    Feb 5, 2020
    Posts:
    3
    Thank you.