Focuses the view.
Optionaldirection: -1 | 1This optional parameter helps improve the UX by providing additional information about the direction the focus moved (e.g. in a complex view or a form). It is useful for views that host multiple focusable children (e.g. lists, toolbars):
1 indicates that the focus moved forward and, in most cases, the first child of the focused view should get focused,-1 indicates that the focus moved backwards, and the last focusable child should get focusedSee module:ui/focuscycler~FocusCycler#event:forwardCycle and module:ui/focuscycler~FocusCycler#event:backwardCycle to learn more.
A module:ui/view~View that can be focused (e.g. has
focus()method).