Skip to content

Fix WebView focus on Windows by using native wry focus API#32

Merged
kdroidFilter merged 1 commit intokdroidFilter:mainfrom
zaroxh:main
Mar 9, 2026
Merged

Fix WebView focus on Windows by using native wry focus API#32
kdroidFilter merged 1 commit intokdroidFilter:mainfrom
zaroxh:main

Conversation

@zaroxh
Copy link
Contributor

@zaroxh zaroxh commented Mar 9, 2026

This PR fixes a Windows issue where the WebView did not reliably receive focus when requested.

Switched focus_inner from the JavaScript fallback to wry’s native focus() method, which correctly applies platform-level focus on Windows while keeping behavior consistent on the other platforms.

See https://docs.rs/wry/0.54.2/wry/struct.WebView.html#method.focus

@zaroxh
Copy link
Contributor Author

zaroxh commented Mar 9, 2026

@kdroidFilter could you have a look? :)

@dkluske
Copy link

dkluske commented Mar 9, 2026

Tested it, works fine!

@kdroidFilter kdroidFilter merged commit 3cebc43 into kdroidFilter:main Mar 9, 2026
4 checks passed
@kdroidFilter
Copy link
Owner

awesome work ! thank you again !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants