LearnNewsExamplesServices
Frontmatter
id8579
titleFix ListModel keyboard navigation for trees and filtered lists
stateClosed
labels
bugai
assigneestobiu
createdAtJan 12, 2026, 8:03 AM
updatedAtJan 12, 2026, 8:07 AM
githubUrlhttps://github.com/neomjs/neo/issues/8579
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 12, 2026, 8:07 AM

Fix ListModel keyboard navigation for trees and filtered lists

Closed v11.20.0 bugai
tobiu
tobiu commented on Jan 12, 2026, 8:03 AM

The Navigator addon calculates activeIndex based on the current DOM state. For Neo.tree.List, collapsed nodes are removed from the DOM (removeDom: true), causing the DOM item count to be smaller than the Store item count. This causes ListModel.onListNavigate to retrieve the wrong record when using store.getAt(data.activeIndex). The fix is to use data.activeItem (the DOM ID) to look up the record, which is robust against DOM/Store mismatches.

tobiu added the bug label on Jan 12, 2026, 8:03 AM
tobiu added the ai label on Jan 12, 2026, 8:03 AM
tobiu
tobiu Jan 12, 2026, 8:07 AM

Input from Gemini 3 Pro:

✦ I have updated Neo.selection.ListModel.onListNavigate to prioritize record lookup via the activeItem's DOM ID.

This ensures that keyboard navigation correctly identifies the underlying record even when the DOM structure differs from the flat store (e.g., in Neo.tree.List with collapsed nodes or future buffered lists). The previous index-based lookup is retained as a fallback.

The fix is generic and benefits all lists inheriting from ListModel.

tobiu assigned to @tobiu on Jan 12, 2026, 8:07 AM
tobiu closed this issue on Jan 12, 2026, 8:07 AM