> For the complete documentation index, see [llms.txt](https://minwork.gitbook.io/long-press-hook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://minwork.gitbook.io/long-press-hook/advanced/options/cancellation/cancel-on-movement.md).

# Cancel on movement

If long press should be cancelled when moved outside boundaries

#### Name

`cancelOnMovement`

#### Type

`boolean | number`

#### Default value

`false`

#### Description

If long press should be canceled when mouse / touch / pointer move far enough from the initial press position.

Possible values:&#x20;

* `false` - Disable cancelling on movement&#x20;
* `true` - Enable cancelling on movement and use default *25px* boundary size
* `number` - Set a specific boundary value in pixels (square side size inside which movement won't cancel long press)

![](https://1041512627-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe7YSKGn5OVHfSXruihOD%2Fuploads%2F06IILJmuFR5JV9T03e1J%2FScreenshot%202023-08-15%20at%2012.13.41.png?alt=media\&token=24ef4b43-efd0-419e-904b-3764b42b14fa)
