Function freya::prelude::dioxus_elements::events::ontouchcancel

source ·
pub fn ontouchcancel<E, T>(
    _f: impl FnMut(Event<TouchData>) -> E + 'static,
) -> Attribute
where E: EventReturn<T>,
Expand description

The touchcancel event fires when the user cancels the touching, this is usually caused by the hardware or the OS. Also see ontouchend.

Event Data: TouchData

§Example

fn app() -> Element {
    rsx!(
        rect {
            width: "100",
            height: "100",
            background: "red",
            ontouchcancel: |_| println!("Touching canceled!")
        }
    )
}