You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
See also this comment that shows how to resolve the issue by making calls to Browser.SendFocusEvent in grab_focus, focus_in_event and focus_out_event GTK events: tiliado/cef@b1d9e48#commitcomment-27005338
Activity
Fix focus in all examples. Pass kwargs to Handlers' callbacks (BC BRE…
[-]Multiple keyboard focus issues on Linux[/-][+]Multiple keyboard focus issues on Linux/Mac[/+]cztomczak commentedon Nov 14, 2018
Focus issues can be resolved on Linux by applying a few patches to CEF, see this comment:
https://bitbucket.org/chromiumembedded/cef/issues/2026/multiple-major-keyboard-focus-issues-on#comment-42770322
cztomczak commentedon Nov 14, 2018
See also this comment that shows how to resolve the issue by making calls to
Browser.SendFocusEventingrab_focus,focus_in_eventandfocus_out_eventGTK events: tiliado/cef@b1d9e48#commitcomment-27005338