Open
Description
Update: Focus issues also occur on Mac. CEF browser is always stealing focus when switching between navigation bar and cef widget controls.
There are multiple keyboard focus issues reproducible in many examples. This is an upstream CEF issue, reported problems in great details in CEF Issue #2026.
All focus issues were fixed with workarounds. There are mostly two types of fixes that helped. In some examples only one of them was needed, in others it was required to apply both fixes.
- Call Browser.SetFocus during initial app loading in LoadHandler.OnLoadStart
- Call Browser.SetFocus in FocusHandler.OnGotFocus. If this is not applied then when switching to another window (alt+tab) and then back to this example, keyboard focus becomes broken, you can't type anything, even though a type cursor blinks in web view.
- In tkinter example there is yet another special fix to restore focus by calling focus_force() on the top control
CEF Issue #1856 may be related.
Keeping this issue still Open until this is properly fixed in upstream CEF.