gioser-web: fix graph click — clone Element before dyn_into

- dyn_into() consumes the value; clicking after that is a no-op.
- Clone the Element first, then dyn_into to HtmlElement and call click()
This commit is contained in:
Sergio
2026-05-23 17:02:40 +00:00
parent 97bea4c99f
commit a072538465
5 changed files with 39 additions and 37 deletions
+3 -1
View File
@@ -353,7 +353,9 @@ impl AppState {
if let Some(tip) = document_clone.query_selector(
&format!(".tip[data-md][id='tip-{}']", el)
).ok().flatten() {
let _ = tip.dyn_into::<HtmlElement>().map(|e| e.click());
// Clonar referencia antes de dyn_into (consume)
let tip_html: HtmlElement = tip.clone().dyn_into().unwrap();
tip_html.click();
}
});
let mut graph = GraphWidget::new(