diff --git a/examples/demo.rs b/examples/demo.rs index ec5d395..ee8a9c5 100644 --- a/examples/demo.rs +++ b/examples/demo.rs @@ -80,7 +80,10 @@ fn SceneTree<'a>(cx: Scope, selected_entity: &'a UseState>) -> El } } node { - onclick: move |_| spawn_entity(), + onclick: move |event| { + spawn_entity(); + event.stop_propagation(); + }, onmouse_enter: enter, onmouse_exit: exit, padding: "8",