bug(core): syncing one FormGroup to another doesn't allow child focus events to flow to the sibling control
By default, focus events do not sync from one control to another. However, there are situations when a developer will want to manually sync focus events. At the moment, if an AbstractControlContainer
is synced to another AbstractControlContainer
, it is not possible to sync child focus events. This is because child controls are not directly synced with one another, only the parent controls are directly synced. Instead, when a child StateChange event happens it "bubbles up" to the parent which then syncs the event with its sibling. Because focus events don't bubble, it is not possible to sync child focus events through a parent control.
The solution is to make child focus events bubble internally within AbstractControlContainers. These events could be passed from one AbstractControlContainer to another (if synced). An event passed this way would ultimately cause the appropriate child control to receive a Focus
event, at which point the control would continue to ignore the event by default (however, developers could then override this behavior if desired).