Allow multiple prevent default for Web, Desktop and LiveView (#987)

* Allow multiple prevent default in dioxus_web

* Use SplitWhitespace for prevent default requests

* Add multiple prevent default option to liveview and desktop

* Update docs about prevent_default attribute

* cargo clippy

* update prevent default guide example

---------

Co-authored-by: Evan Almloff <ealmlof1@stumail.jccc.edu>
This commit is contained in:
AttilioandEvan Almloff authored and GitHub committed 2023-04-27 11:26:04 -05:00
1 parent c904411190
commit c645e1c6aa
4 files changed
+21 -14

No files matched your search

@@ -41,7 +41,7 @@ If you want to prevent this behavior, you can call `stop_propagation()` on the e
Some events have a default behavior. For keyboard events, this might be entering the typed character. For mouse events, this might be selecting some text.
In some instances, might want to avoid this default behavior. For this, you can add the `prevent_default` attribute with the name of the handler whose default behavior you want to stop. This attribute is special: you can attach it multiple times for multiple attributes:
In some instances, might want to avoid this default behavior. For this, you can add the `prevent_default` attribute with the name of the handler whose default behavior you want to stop. This attribute can be used for multiple handlers using their name separated by spaces:
```rust
{{#include ../../../examples/event_prevent_default.rs:prevent_default}}