Line

You are reading docs for v0.8. See latest (v0.9)

ui/client/features/shell/hooks/useFocusMode

Cockpit client (features), v0.8. Source: ui/client/features/shell/hooks/useFocusMode.tsx.

Functions#

useFocusMode()#

useFocusMode(): ShellFocusApi & object

Defined in: ui/client/features/shell/hooks/useFocusMode.tsx:13

Owns focus mode for the shell (see useShellFocus for what it is).

Deliberately CSS/state-driven rather than the browser Fullscreen API: what has to disappear is the Cockpit's own chrome, which only React and CSS can hide, and Esc, focus return and the reduced-motion rule then behave identically in every browser and in headless runs — where requestFullscreen needs a user gesture and can be refused by permissions policy.

Returns#

ShellFocusApi & object