Device: Roku Ultra 4800RW, OS 16.0.4 build 834, 1080p (FHD channel)
Component: RowList, rowFocusAnimationStyle: “fixedFocus”
Severity: Medium. Focus ends up somewhere the app was never told about, so anything the app keeps in step with focus (the focused item’s details, audio guide, pagination) goes stale until the user next moves.
Summary
If an app responds to a rowItemFocused change by writing jumpToRowItem in that same observer callback, RowList moves focus to the new item, but rowItemFocused observers aren’t notified of the new position. RowList doesn’t report a change to rowItemFocused made while it’s still reporting the previous one. The same jumpToRowItem written in the next frame (for example from a Timer) is reported as usual.
Typical cases that write jumpToRowItem from a rowItemFocused callback:
- replacing content and restoring focus once a scroll has come to rest
- correcting focus that has landed somewhere the app doesn’t allow
Steps to reproduce
- Create a Scene containing a RowList with two rows of 12 items each. Set rowFocusAnimationStyle: “fixedFocus”, vertFocusAnimationStyle: “fixedFocus”, itemSize: [1749, 330], rowItemSize: [[398, 330]], rowItemSpacing: [[24, 0]], numRows: 3, and give it focus.
- Observe rowItemFocused, printing every change. In the observer, the first time focus reaches [0,3], write jumpToRowItem = [1,8].
- Press RIGHT 3 times.
Expected
rowItemFocused reports [0,3], then [1,8].
Actual
rowItemFocused reports [0,3] and nothing more. Focus is visibly on [1,8], and the next RIGHT moves on from [1,8], but no report of [1,8] ever arrives.
Notes
- Workaround: write jumpToRowItem on the next frame instead (e.g. from a Timer with a short duration), never from inside the rowItemFocused callback.
- Mentioned in passing in Replacing RowList content during a held scroll leaves a stale column that a later key press uses, where its workaround has to apply the content change on the next frame because of it.
