Web/API/FocusEvent

From Get docs

The FocusEvent interface represents focus-related events, including focus, blur, focusin, and focusout.

Constructor

FocusEvent()
Creates a FocusEvent event with the given parameters.

Properties

This interface also inherits properties from its parent UIEvent, and indirectly from Event.

FocusEvent.relatedTarget
Is an EventTarget representing a secondary target for this event. In some cases (such as when tabbing in or out a page), this property may be set to null for security reasons.

Methods

This interface has no specific methods. It inherits methods from its parent UIEvent, and indirectly from Event.

Specifications

Specification Status Comment
UI EventsThe definition of 'FocusEvent' in that specification. Working Draft
Document Object Model (DOM) Level 3 Events SpecificationThe definition of 'FocusEvent' in that specification. Obsolete Initial definition.

Browser compatibility

Update compatibility data on GitHub

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet

FocusEvent

Experimental'

Chrome

Full support Yes

Edge

Full support 12

Firefox

Full support 24

IE

Full support 9

Opera

Full support Yes

Safari

Full support Yes

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support 24

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support Yes

FocusEvent() constructor

Experimental'

Chrome

Full support Yes

Edge

Full support ≤18

Firefox

Full support 24

IE

No support No

Opera

Full support Yes

Safari

Full support Yes

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support 24

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support Yes

relatedTarget

Experimental'

Chrome

Full support Yes

Edge

Full support 12

Firefox

Full support 48

IE

Full support 9

Opera

Full support Yes

Safari

Full support Yes

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support 48

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support Yes

Legend

Full support  
Full support
No support  
No support
Experimental. Expect behavior to change in the future.'
Experimental. Expect behavior to change in the future.


See also