Skip to content

Multiple keyboard focus issues on Linux/Mac #284

Open
@cztomczak

Description

@cztomczak

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.

  1. Call Browser.SetFocus during initial app loading in LoadHandler.OnLoadStart
  2. 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.
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions