Function: createLongPress()
function createLongPress(options): LongPressInstance;
Defined in: dom/src/pointer/long-press.ts:44
Repeat an action while a pointer is held down: once on the press, then
again every interval after delay — the way a stepper button or a
key held on a keyboard behaves.
The release is listened for on the window, not on the element: the pointer may be let go anywhere. Only the pointer that started the press ends it, so a second finger lifting elsewhere does not. The window losing focus ends it too, since the release would never arrive.
Parameters
| Parameter | Type |
|---|---|
options | LongPressOptions |