Skip to content

Commit 726f4b3

Browse files
committed
use focus method from wry instead of javascript
1 parent c680fe7 commit 726f4b3

File tree

1 file changed

+1
-3
lines changed
  • wrywebview/src/main/rust

1 file changed

+1
-3
lines changed

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)