From f1c386895e312fe27629119b131663523b328776 Mon Sep 17 00:00:00 2001 From: spinline Date: Sun, 1 Feb 2026 17:11:53 +0300 Subject: [PATCH] fix(frontend): cast Element to HtmlElement before calling blur --- frontend/src/components/layout/statusbar.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/layout/statusbar.rs b/frontend/src/components/layout/statusbar.rs index e96c4a7..57d67f2 100644 --- a/frontend/src/components/layout/statusbar.rs +++ b/frontend/src/components/layout/statusbar.rs @@ -1,4 +1,5 @@ use leptos::*; +use wasm_bindgen::JsCast; #[component] pub fn StatusBar() -> impl IntoView { @@ -55,7 +56,9 @@ pub fn StatusBar() -> impl IntoView { // Close the dropdown by blurring the active element if let Some(active) = doc.active_element() { - let _ = active.blur(); + if let Ok(html_element) = active.dyn_into::() { + let _ = html_element.blur(); + } } } >