#4583·base-ui

[dialog] Escape closes multiple sibling dialogs when 3+ are open simultaneously

Author: macieklamberskiCreated Apr 10, 2026Updated Sep 23, 2026
Labelstype: bugcomponent: dialog

Bug report

Current behavior

When 3+ non-nested sibling modal dialogs are open simultaneously, pressing Escape closes multiple dialogs instead of only the topmost one. With 2 sibling dialogs, Escape correctly closes only the topmost. With 3+, the topmost closes first, then the remaining dialogs close together on the same keypress.

Expected behavior

Each Escape press should close only the topmost dialog, regardless of how many sibling dialogs are open. Three dialogs should require three Escape presses to close all of them.

Reproducible example

https://codepen.io/macieklamberski/full/azmRjdm

Base UI version

v1.3.0

Which browser are you using?

Chrome (also reproducible in Safari and Firefox)

Which OS are you using?

Mac OS

Which assistive tech are you using (if applicable)?

N/A

Additional context

N/A