mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-10 06:34:20 +00:00
fix hydration for non-bubbling events (#2234)
This commit is contained in:
parent
be99e29e5f
commit
4d25e3f6a2
3 changed files with 6 additions and 2 deletions
|
@ -26,6 +26,7 @@ tokio = { workspace = true, features = ["fs", "io-util"], optional = true }
|
|||
rfd = { version = "0.14", optional = true }
|
||||
futures-channel = { workspace = true }
|
||||
serde_json = { version = "1", optional = true }
|
||||
tracing.workspace = true
|
||||
|
||||
[dependencies.web-sys]
|
||||
optional = true
|
||||
|
|
|
@ -348,7 +348,10 @@ pub fn event_bubbles(evt: &str) -> bool {
|
|||
"transitionend" => true,
|
||||
"toggle" => true,
|
||||
"mounted" => false,
|
||||
_ => true,
|
||||
_ => {
|
||||
tracing::warn!("Unknown event name: {evt}");
|
||||
true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -197,7 +197,7 @@ impl Renderer {
|
|||
// then write any listeners
|
||||
for name in accumulated_listeners.drain(..) {
|
||||
write!(buf, ",{}:", &name[2..])?;
|
||||
write!(buf, "{}", dioxus_html::event_bubbles(name) as u8)?;
|
||||
write!(buf, "{}", dioxus_html::event_bubbles(&name[2..]) as u8)?;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue