When creating a "list-box" gui element in the "script.on_configuration_changed" event this list-box cannot be scrolled (scroll_to_item) in the same event.
Obligatory expected result: The "list-box" gui element should scroll to the requested index
I did not test if this applies to more circumstances than that. (Meaning stuff like: "Can the list-box be created earlier?" or "Can the list-box scroll if there is enough time in between list-box creation and scroll_to_item" )
Here is a small mod that shows this bug in action (Note: You need to load a save that did not contain this mod before in order to trigger the "script.on_configuration_changed" event)
If this mod created the gui you should see two chat messages and a "list-box" gui element in the top left like this:
[1.1.74] List-box not scrolling to index while in "on_configuration_changed"
Re: [1.1.74] List-box not scrolling to index while in "on_configuration_changed"
Note to other developers: this is due to the actual GUI widget not existing at the time this event runs.
If you want to get ahold of me I'm almost always on Discord.