Frontmatter
| id | 5371 |
| title | main.addon.Navigator: navigateTargetChildListChange() => steals focus |
| state | Closed |
| labels | bug |
| assignees | ExtAnimal |
| createdAt | Mar 22, 2024, 6:36 PM |
| updatedAt | Mar 27, 2024, 4:18 PM |
| githubUrl | https://github.com/neomjs/neo/issues/5371 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Mar 27, 2024, 4:18 PM |
main.addon.Navigator: navigateTargetChildListChange() => steals focus
tobiu assigned to @ExtAnimal on Mar 22, 2024, 6:36 PM

tobiu
Mar 27, 2024, 4:18 PM
@ExtAnimal: added the config keepFocusIndex inside list.Base with a default to false. ComboBox will pass true into its list instance.
if you have a better idea to fix it, please open a new ticket.
tobiu closed this issue on Mar 27, 2024, 4:18 PM
while it does make sense for a
form.field.ComboBox, the current behavior causes serious problems.// This is called if mutations take place within the subject element. // We have to keep things in order if the list items change. navigateTargetChildListChange(mutations, data) { this.fixItemFocusability(data); // Active item gone. // Try to activate the item at the same index; if (data.activeItem && !data.subject.contains(data.activeItem)) { const allItems = data.subject.querySelectorAll(data.selector); allItems.length && this.navigateTo(allItems[Math.max(Math.min(data.activeIndex, allItems.length - 1), 0)], data); } }inside the learning section we have a topics list on the left, and a page sections list on the right side.
without doing a deep dive, my first impression is that a
ComboBoxshould send a target focus node id. if this one has the focus, keep the current logic. if it does not have the focus, do not re-apply it.thoughts? @maxrahder @mxmrtns