This looks redundant. I think code should be caring about whom to give focus to, not in explicitly unfocusing the item that's losing it as this is the side-effect of focusing someone else anyway. Is that really needed?
--------------------------------
"""
stage.focus = true;
"""
In some other focus-related branch you have the Stage focusing itself on its own accord. Would be good to consolidate that responsibility in Shell if feasible to avoid clashes. Ideally I think Shell logic should be the one deciding which Shell immediate child will get focus at any given time.
"""
root.focus = false;
"""
This looks redundant. I think code should be caring about whom to give focus to, not in explicitly unfocusing the item that's losing it as this is the side-effect of focusing someone else anyway. Is that really needed?
------- ------- ------- ------- ----
"""
stage.focus = true;
"""
In some other focus-related branch you have the Stage focusing itself on its own accord. Would be good to consolidate that responsibility in Shell if feasible to avoid clashes. Ideally I think Shell logic should be the one deciding which Shell immediate child will get focus at any given time.