RowList's currFocusColumn keeps its old value after jumpToRowItem or a move to another row Tag: bug-report

Device: Roku Ultra 4800RW, OS 16.0.4 build 834, 1080p (FHD channel)
Component: RowList, rowFocusAnimationStyle: “fixedFocus”
Severity: Medium. currFocusColumn is the field the docs suggest for horizontal pagination, but after a jump or a row change it names a column that isn’t focused, so pagination driven by it can stall at the end of a row.

Summary

The RowList docs describe currFocusColumn as indicating “which column of the currently focused row in a RowList component currently has focus”, and as the field typically used to implement horizontal pagination. In practice it’s only updated by a scroll along a row. After either of these, it keeps whatever value the last horizontal scroll left it at:

  1. a jumpToRowItem onto a different row (for example focus restored after a content replacement)
  2. UP/DOWN onto a row whose focused item is at a different column

It stays at that stale value, often 0, until the next horizontal scroll, while rowItemFocused correctly reports the new item.

Steps to reproduce

  1. 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.
  2. Observe currFocusColumn and rowItemFocused, printing every change.
  3. Press RIGHT 5 times on row 0, so focus is on [0,5] and currFocusColumn is 5.
  4. Write jumpToRowItem = [1, 9].
  5. Print currFocusColumn.

Expected

currFocusColumn is 9, matching rowItemFocused [1,9].

Actual

rowItemFocused reports [1,9], but currFocusColumn still reads 5. It only catches up with the next LEFT or RIGHT. The same happens on DOWN from [0,5] to a row whose focused item is at another column.

Notes

  • Any app following the docs’ advice and comparing currFocusColumn against the row’s item count to fetch the next page gets the wrong answer after a jump or a row change. In our app this left pagination waiting on a column that was never going to change, and the user was stuck at the end of the row until they pressed LEFT or RIGHT.
  • Workaround: track which of currFocusColumn and rowItemFocused changed last, and only trust currFocusColumn while it has moved since rowItemFocused last reported. Otherwise use rowItemFocused.
  • Mentioned in passing in Replacing RowList content during a held scroll leaves a stale column that a later key press uses, reported separately here because it affects pagination on its own.