Restore focus issue with ListPanel with createNextPanelOnItemFocus=true
I just found out that weird issue.
My scene uses sliding panels. The very first panel on the left is a ListPanel with createNextPanelOnItemFocus=true. As recommended in the documentation, I use a "single pair of Panel nodes (for the panels on the right side) and alternate between them each time the createNextPanelIndex field (of ListPanel) is set".
Somewhere in my scene, but outside the panel set, there's a control that can acquire the focus.
The issue occurs when the focus is acquired by that control, and then later on restored to the ListPanel.
What happens then is that somehow the system sets createNextPanelIndex, even though there's no reason to. The createNextPanelIndex value is the same as the previous time since nothing has changed, even though the documentation says that "the createNextPanelIndex field is guaranteed to be set exactly once whenever the next panel for the focused list item needs to be created."
This event triggers a useless reload of the next panel. I can add code to detect that createNextPanelIndex hasn't changed since the last time and do nothing, but then on the next navigation inside ListPanel I encounter weird animation/opacity issues.
There should be a way to restore the focus to the ListPanel because:
If I set the focus on the ListPanel, then make a Dialog appear, and then dismiss the dialog, that incorrect behavior doesn't occur.
If I set the focus on the ListPanel, then wait for the screen saver to appear, and then dismiss the screen saver, that incorrect behavior doesn't occur neither.