GroupFocusListener¶
Overview¶
A listener that helps track focus for groups of Nodes. Properties allow you to observe when focus enters a group or moves within a group of Nodes.
Scenery (and native DOM) events make this difficult to track because the group receives focusin/focusout events even when focus moves within the group. This listener handles that for you.
@author Jesse Greenberg (PhET Interactive Simulations)
Class GroupFocusListener¶
Constructor¶
new GroupFocusListener( groupParent : Node )¶
Instance Methods¶
focusin( event : SceneryEvent )¶
focusout( event : SceneryEvent )¶
dispose()¶
Instance Properties¶
focusInGroupProperty : TProperty<boolean>¶
(readonly)
True when the focus is somewhere in this group.
focusTargetProperty : TProperty<Node | null>¶
(readonly)
The target of the focus, or null if the focus is not in this group.
Source Code¶
See the source for GroupFocusListener.ts in the scenery repository.