fix(frontend): cast Element to HtmlElement before calling blur

This commit is contained in:
spinline
2026-02-01 17:11:53 +03:00
parent 19f6e11601
commit f1c386895e

View File

@@ -1,4 +1,5 @@
use leptos::*; use leptos::*;
use wasm_bindgen::JsCast;
#[component] #[component]
pub fn StatusBar() -> impl IntoView { pub fn StatusBar() -> impl IntoView {
@@ -55,7 +56,9 @@ pub fn StatusBar() -> impl IntoView {
// Close the dropdown by blurring the active element // Close the dropdown by blurring the active element
if let Some(active) = doc.active_element() { if let Some(active) = doc.active_element() {
let _ = active.blur(); if let Ok(html_element) = active.dyn_into::<web_sys::HtmlElement>() {
let _ = html_element.blur();
}
} }
} }
> >