Skip to main content

Interface: WheelOptions

Defined in: dom/src/pointer/wheel.ts:1

Properties​

onWheel​

onWheel: (event) => void;

Defined in: dom/src/pointer/wheel.ts:7

Called for every wheel event that requireFocus lets through. The listener is not passive, so this may call preventDefault() to keep the page from scrolling.

Parameters​

ParameterType
eventWheelEvent

Returns​

void


requireFocus?​

optional requireFocus?: boolean;

Defined in: dom/src/pointer/wheel.ts:21

Only report events while the focus is inside the element.

A control that reacts to the wheel on hover alone takes the scroll away from the page, so passing over one in a long form silently changes its value. Requiring focus makes that an explicit act.

The check is contains, not an identity test: the element that actually takes focus is usually a descendant, such as a thumb or an <input>, and a caller may have replaced it with markup of their own.

Default​

false