liveBook · Manning

Blur event

A blur event is a browser event dispatched when an element or window loses focus.

How 2 Manning books explain it

Tiny CSS Projects

A blur event is a browser event fired when an element loses focus.

How it is used
Uses focus loss to mark form fields as interacted with before displaying validation errors.
How deep it goes
Defines the event and demonstrates its validation role, but defers JavaScript listener implementation details.
Examples
Demonstrates clicking or tabbing away from fields and revealing errors through the .dirty:invalid + .error span selector.
What you can do after
Apply it via JavaScript to identify touched fields and coordinate accessible, delayed form-validation feedback.

Read how Tiny CSS Projects explains blur event →

D3.js in Action, Third Edition

A blur event is a browser event dispatched when an element loses input focus.

How it is used
Supports keyboard-accessible tooltips by hiding them when focused visualization elements lose focus.
How deep it goes
Explains the event’s definition and its listener pairing, then applies it to entering visualization elements without browser internals.
Examples
Uses keyboard-accessible cetacean scatterplot circles whose tooltips hide on blur.
What you can do after
Apply it via the on() method to hide visualization tooltips when keyboard focus leaves an element.

Read how D3.js in Action, Third Edition explains blur event →

Also covered in

Related concepts

Questions about blur event

What is blur event?

A blur event is a browser event dispatched when an element or window loses focus.

Which Manning books explain blur event?

Tiny CSS Projects and D3.js in Action, Third Edition.

What is the difference between blur event and event bubbling?

A blur event is a browser event dispatched when an element or window loses focus. Event bubbling is DOM event propagation in which an event travels from its target through successive ancestor nodes.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.