Skip to content

Commit

Permalink
xilem_web: Remove hardcoded prevent_default/stop_propagation as t…
Browse files Browse the repository at this point in the history
…he user should decide that behavior (#458)

I think we could also create some additional sugar around that, but
since the event is given to the user, they can handle that behavior
anyway.

Fixes #457
  • Loading branch information
Philipp-M authored Jul 29, 2024
1 parent 67afe67 commit a2f1360
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions xilem_web/src/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@ fn create_event_listener<Event: JsCast + crate::Message>(
) -> Closure<dyn FnMut(web_sys::Event)> {
let thunk = ctx.message_thunk();
let callback = Closure::new(move |event: web_sys::Event| {
// TODO make this configurable
event.prevent_default();
event.stop_propagation();
let event = event.dyn_into::<Event>().unwrap_throw();
thunk.push_message(event);
});
Expand Down

0 comments on commit a2f1360

Please sign in to comment.