Skip to content

ScreenLayer

Defined in: src/dom/screen.ts:18

A floating layer stacked above the normal widget tree — a modal dialog or a non-modal sticky panel. Layers share the Screen.overlays paint list but add focus and key-routing semantics on top of it.

closeOnEscape: boolean

Defined in: src/dom/screen.ts:24

Esc dismisses the layer (calls onClose) when it bubbles unhandled.


closeOnOutsideClick: boolean

Defined in: src/dom/screen.ts:26

A click outside the panel dismisses the layer.


optional keyInterceptor?: (ev) => void

Defined in: src/dom/screen.ts:34

Sticky panels: sees key events before they bubble to the focused widget, so it can claim navigation keys (↑/↓/Enter) while ordinary text still flows to the focused control below. Set ev.handled to consume the key.

KeyEvent

void


modal: boolean

Defined in: src/dom/screen.ts:22

Modal layers trap focus and block keys/mouse from reaching the layer below.


optional onClose?: () => void

Defined in: src/dom/screen.ts:28

Invoked when the layer requests to close (Esc / outside click).

void


optional previousFocus?: Widget | null

Defined in: src/dom/screen.ts:36

Focus to restore when a modal layer is removed (filled in by pushLayer).


root: OverlayRootWidget

Defined in: src/dom/screen.ts:20

The full-screen root the layer’s content is portalled into.