We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c086961 commit b55c948Copy full SHA for b55c948
apps/browser/src/main.rs
@@ -61,6 +61,20 @@ fn app() -> Element {
61
let load_current_url = use_callback(move |_| {
62
let request = (*history.current_url().read()).clone();
63
*url_input_value.write_unchecked() = request.url.to_string();
64
+
65
+ if let Some(handle) = &*webview_node_handle.peek() {
66
+ let node_id = handle.node_id();
67
+ let mut doc = handle.doc_mut();
68
+ if let Some(sub_doc) = doc
69
+ .get_node_mut(node_id)
70
+ .and_then(|node| node.element_data_mut())
71
+ .and_then(|el| el.sub_doc_data_mut())
72
+ {
73
+ let mut sub_doc = sub_doc.inner_mut();
74
+ sub_doc.clear_focus();
75
+ }
76
77
78
println!("Loading {}...", &request.url.as_str());
79
loader.load_document(request);
80
});
0 commit comments