[android-components](../../index.md) / [mozilla.components.feature.contextmenu](../index.md) / [ContextMenuFragment](index.md) / [onCancel](./on-cancel.md)

# onCancel

`fun onCancel(dialog: <ERROR CLASS>): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/feature/contextmenu/src/main/java/mozilla/components/feature/contextmenu/ContextMenuFragment.kt#L79)