THIS IS A BREAKING CHANGE REQUIRING A MAJOR VERSION
Modifies the behaviour of setActiveChild so that it now only sets the active child of the targeted element, previously it would follow the parent path up and set the active child of every parent element all the way up to the top, resulting in problems with element focus.
This behaviour seems more intuitive given that the function name specifies nothing about its recursive behaviour.
Motivation and Context
When changing a part of the tree that is not in the main focus part we need to be able to change active children without resetting the focus state, for example: to make a newly focusable button the first indexed child on its row. This was previously impossible as changing the active child would propagate changes up the tree.
Resolves: https://github.com/bbc/lrud/issues/40
How Has This Been Tested?
Automated + manual tests
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[X] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
[X] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
Description
THIS IS A BREAKING CHANGE REQUIRING A MAJOR VERSION
Modifies the behaviour of
setActiveChild
so that it now only sets the active child of the targeted element, previously it would follow the parent path up and set the active child of every parent element all the way up to the top, resulting in problems with element focus. This behaviour seems more intuitive given that the function name specifies nothing about its recursive behaviour.Motivation and Context
When changing a part of the tree that is not in the main focus part we need to be able to change active children without resetting the focus state, for example: to make a newly focusable button the first indexed child on its row. This was previously impossible as changing the active child would propagate changes up the tree. Resolves: https://github.com/bbc/lrud/issues/40
How Has This Been Tested?
Automated + manual tests
Types of changes
Checklist: