I found a Chrome-only bug in HeroUI v3 where opening a Modal or AlertDialog directly from a Dropdown item can leave the dropdown popover stuck on screen and still interactive. I could reproduce it reliably in Chrome, but Firefox works fine. The bug happens when the dropdown is closed and the next overlay is opened in the same action.
A simple reproduction looks like this:
<Dropdown> <Dropdown.Item onPress={() => setModalOpen(true)}>Open modal</Dropdown.Item> </Dropdown> <Modal isOpen={modalOpen} onOpenChange={setModalOpen}>...</Modal>In Chrome, the modal opens, but the dropdown overlay may stay mounted instead of cleaning up correctly. It looks like a z-index issue at first, but it seems to be an overlay lifecycle problem, because both overlays can remain in the DOM at the same time. In my case, using Popover instead of Dropdown for this type of action menu fixed it, and so did delaying the second overlay until the first one was fully closed. Also 150ms timeout before opening modal/alert dialog fixes this issue.
Please authenticate to join the conversation.
In Review
Issues
27 days ago

mrn0_user
Get notified by email when there are changes.
In Review
Issues
27 days ago

mrn0_user
Get notified by email when there are changes.