Dialog 1 → Popover 1 → Dialog 2

BUG: Closing Dialog 2 closes Popover 1 and Dialog 1

Dialog 1 → Dialog 2

OK: Closing Dialog 2 keeps Dialog 1 open

Popover 1 → Dialog 1

OK: Closing Dialog 1 keeps Popover 1 open

Dialog 1 → Popover 1

Test: Closing Popover 1 should keep Dialog 1 open

Popover 1 → Popover 2 → Dialog 1

Test: Closing Dialog 1 should keep both Popovers open


Edge Cases

Deep: Dialog → Popover → Dialog → Popover

Test: Each Escape should close only the topmost layer

Click Outside Test

Test: Click outside button/input should close layers appropriately

Dialog → Dialog → Dialog

Test: Each Escape closes only topmost dialog

Popover → Popover → Popover

Test: Each Escape closes only topmost popover

Popover → Dialog → Popover → Dialog

Test: Alternating layers should each close individually

Dialog with Multiple Popover Triggers

Test: Opening one popover then another, closing should work correctly