HTML element focus not working within ChromiumWebBrowser #3541
Unanswered
HorvatJosip
asked this question in
Q&A
Replies: 1 comment 3 replies
-
|
Did you give the WinForms control focus? Rather than using WindowsFormsHost the https://www.nuget.org/packages/CefSharp.Wpf.HwndHost/ provides a HwndHost implementation. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am using the
ChromiumWebBrowserto display the login form for Identity Server within a WPF project and I can't get the username field to focus once the form loads.The NuGet installed within the project is
CefSharp.WinFormsversion 88.2.90.0.(
IdentityModel.OidcClientNuGet version is 3.0.0.0)The flow is set up as follows: create
OidcClientOptionswithBrowserproperty set to instance of browser class that creates aChromiumWebBrowserand places it inside aWindowsFormsHost(Childproperty set to instance ofChromiumWebBrowser) on a new WPF window (Contentset to theWindowsFormsHostmentioned before). Passing the options toOidcClientand callingLoginAsyncfires up the browser.These are things I've tried:
autofocusHTML attributeThis is really weird because the input is actually focused (according to
document.activeElement.name), but it just doesn't register it unless I press the tab key.Beta Was this translation helpful? Give feedback.
All reactions