focuschanging event
Collapse the table of content
Expand the table of content

WinJS.UI.XYFocus.focuschanging event

Applies to Windows and Windows Phone

Raised before XYFocus changes focus. The HTMLElement.focus method does not trigger this event. When you handle this event, can use preventDefault to cancel the focus change.

Syntax


function handler(eventInfo) { /* Your code */ }
 
// addEventListener syntax
winJS.UI.XYFocus.addEventListener("focuschanging", handler);
winJS.UI.XYFocus.removeEventListener("focuschanging", handler);


Event information

SynchronousNo
BubblesYes
CancelableYes

 

Event handler parameters

eventInfo

Type: CustomEvent

An object that contains information about the event. The detail property of this object contains the following sub-properties:

detail.nextFocusElement

Type: HTMLElement

The element to receive focus.

detail.keyCode

Type: Number

The key code that triggered the focus change.

Remarks

After the moveFocus() function has been called, the focuschanging event fires. Once the new element has focus, the focuschanged event fires.

Requirements

Minimum WinJS version

WinJS 3.0

Namespace

WinJS.UI.XYFocus

See also

WinJS.UI.XYFocus

 

 

Show:
© 2017 Microsoft