Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

text input Autofocus not works in winforms #4965

Open
1 task done
I-Iege opened this issue Oct 25, 2024 · 2 comments
Open
1 task done

text input Autofocus not works in winforms #4965

I-Iege opened this issue Oct 25, 2024 · 2 comments

Comments

@I-Iege
Copy link

I-Iege commented Oct 25, 2024

Is there an existing issue for this?

  • I have searched both open/closed issues, no issue already exists.

CefSharp Version

129.0.110

Operating System

Windows 11

Architecture

x64

.Net Version

.Net 6.0

Implementation

WinForms

Reproduction Steps

  1. We have a page with text input which set to focus on page load.
  2. open the url with sefsharp winform example browser

Expected behavior

The text input is in fully focused, it is possible to type text after the page loaded.

Actual behavior

The text input has focused style, but has no caret not possible to type.

Regression?

No response

Known Workarounds

No response

Does this problem also occur in the CEF Sample Application

Yes using WPF/OffScreen command line args

Other information

the text input is HTMLInputElement
the page build with node 22.9.0
we have :
"@types/react-dom": "^17.0.11",
"react-dom": "^17.0.2",

@dbuechel
Copy link

dbuechel commented Oct 25, 2024

We have actually just recently stumbled upon this as well, the input focus used to work fine for us using the Windows Forms control when manually focusing the IBrowserHost: SafeExamBrowser/seb-win-refactoring@40d2709.

if (control.IsBrowserInitialized)
{
	control.BrowserCore.GetHost().SetFocus(true);
}

This however appears to have stopped working as it appears.

@dbuechel
Copy link

dbuechel commented Oct 25, 2024

I was just able to resolve the issue using a custom focus handler: SafeExamBrowser/seb-win-refactoring@e8ebb21. It may however be that the default handler still has a bug, as the input focus indeed was not working anymore as explained above.

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

No branches or pull requests

2 participants