presentation/widgets/focus_trap_scope library

Classes

FocusTrapScope
Standard "modal focus trap" for an in-tree overlay panel — wraps child (the modal's own content) in a FocusScope that autofocuses as soon as this widget mounts (i.e. exactly when the overlay it belongs to appears, matching this package's "always mounted, panel nullable" convention — NeonDialog.overlaySlot, PauseOverlay), and restores focus to whatever had it right BEFORE this widget mounted, the moment it's removed from the tree again (the overlay closing).