feat(modal): cap mobile height, pin chrome, restore focus to trigger #268

Merged
vas2000-work merged 1 commit from feat/mapps-264-modal-mobile-height-focus-restore into main 2026-06-17 23:54:49 +02:00
Owner

Render the open modal as a child component (ModalDialog) that mounts only while open, so use_drop fires on every close path (Esc, backdrop, X, Cancel, or a parent-driven close) to restore focus to the control that opened it. The trigger is captured on first render, before the dialog steals focus on mount.

Lay the panel out as a flex column capped at max-h-[90vh]: the header and footer stay pinned (flex-shrink-0) while only the body scrolls (flex-1 min-h-0 overflow-y-auto). Large modals are now usable on small screens with no double-axis scroll.

#MAPPS-264

Render the open modal as a child component (ModalDialog) that mounts only while open, so use_drop fires on every close path (Esc, backdrop, X, Cancel, or a parent-driven close) to restore focus to the control that opened it. The trigger is captured on first render, before the dialog steals focus on mount. Lay the panel out as a flex column capped at max-h-[90vh]: the header and footer stay pinned (flex-shrink-0) while only the body scrolls (flex-1 min-h-0 overflow-y-auto). Large modals are now usable on small screens with no double-axis scroll. #MAPPS-264
feat(modal): cap mobile height, pin chrome, restore focus to trigger
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 2m49s
Create release / Create release from merged PR (pull_request) Has been skipped
ca37aa397a
Render the open modal as a child component (ModalDialog) that mounts only while open, so use_drop fires on every close path (Esc, backdrop, X, Cancel, or a parent-driven close) to restore focus to the control that opened it. The trigger is captured on first render, before the dialog steals focus on mount.

Lay the panel out as a flex column capped at max-h-[90vh]: the header and footer stay pinned (flex-shrink-0) while only the body scrolls (flex-1 min-h-0 overflow-y-auto). Large modals are now usable on small screens with no double-axis scroll.

#MAPPS-264
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-apps!268
No description provided.