Skip to content

Commit 3cebc43

Browse files
authored
Merge pull request #32 from zaroxh/main
Fix WebView focus on Windows by using native wry focus API
2 parents c680fe7 + 726f4b3 commit 3cebc43

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

  • wrywebview/src/main/rust

wrywebview/src/main/rust/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -778,9 +778,7 @@ fn focus_inner(id: u64) -> Result<(), WebViewError> {
778778
wry_log!("[wrywebview] gtk grab_focus called");
779779
}
780780

781-
webview
782-
.evaluate_script("document.documentElement.focus(); window.focus();")
783-
.map_err(WebViewError::from)
781+
webview.focus().map_err(WebViewError::from)
784782
})
785783
}
786784

0 commit comments

Comments
 (0)