<div class='sourceset sourceset-common'>Common</div>

> **Deprecated** Maintained for binary compatibility. Use version with PointerEventPass instead.

<h2 id="waitforuporcancellation">waitForUpOrCancellation</h2>

```kotlin
suspend fun AwaitPointerEventScope.waitForUpOrCancellation(): PointerInputChange?
```

<hr class="docs-overload-divider">

<h2 id="waitforuporcancellation-pass">waitForUpOrCancellation</h2>

<div class='sourceset sourceset-common'>Common</div>

```kotlin
suspend fun AwaitPointerEventScope.waitForUpOrCancellation(
    pass: PointerEventPass = PointerEventPass.Main
): PointerInputChange?
```

Reads events in the given `pass` until all pointers are up or the gesture was canceled. The
gesture is considered canceled when a pointer leaves the event region, a position change has been
consumed or a pointer down change event was already consumed in the given pass. If the gesture
was not canceled, the final up change is returned or `null` if the event was canceled.