Problem
When popovers (OverflowMenu, Toggletip, etc.) are nested inside Modal/ComposedModal, pressing Escape doesn't follow expected behavior. Ideally, it should close the topmost element (popover) first, then the modal. Currently, behavior is inconsistent - in some cases like OverflowMenu, only the Modal closes, leaving the menu open without its trigger button.
Goal
Find a solution for proper escape key and click-outside behavior when popovers are nested inside modals.
Scope
- Test component combinations - Identify which components are affected when placed inside Modal: OverflowMenu, Toggletip etc.
- Evaluate solutions:
- Registration model for tracking modal/popover stack (concerns: backwards compatibility, complexity)
- Simple refactoring opportunities in existing components
- Platform-based approaches (dialog + Popover API)
- Define expected behavior - Should Escape close both or topmost first?
Deliverables
- Component behavior matrix showing current issues
- Recommended solution approach with implementation considerations
- Any quick wins that can improve current state
Problem
When popovers (OverflowMenu, Toggletip, etc.) are nested inside Modal/ComposedModal, pressing Escape doesn't follow expected behavior. Ideally, it should close the topmost element (popover) first, then the modal. Currently, behavior is inconsistent - in some cases like OverflowMenu, only the Modal closes, leaving the menu open without its trigger button.
Goal
Find a solution for proper escape key and click-outside behavior when popovers are nested inside modals.
Scope
Deliverables