Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sgranger
Channel Surfer

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.

Is there a known way to patch this?

This issue occurs in v 9.2.0 (build 4750)

0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.