I want to have a modal transition in (e.g. fade in, slide in, etc.) and also have the button to close the modal have a transition (e.g. background-color change on hover). There is an issue when both the modal and an element inside the modal have a transition where if the inner transition interrupts the modal's transition then the modal will not properly close. The transitions still complete, but the underlying dialog component never gets removed and still blocks all interactions with the rest of the page, with no way to close it.
Better demonstrated in the video, you can see that the backdrop of the modal is never removed, as the modal is never completely closed.
Which package is affected?
Headless Kit
Describe the bug
I want to have a modal transition in (e.g. fade in, slide in, etc.) and also have the button to close the modal have a transition (e.g. background-color change on hover). There is an issue when both the modal and an element inside the modal have a transition where if the inner transition interrupts the modal's transition then the modal will not properly close. The transitions still complete, but the underlying dialog component never gets removed and still blocks all interactions with the rest of the page, with no way to close it.
Better demonstrated in the video, you can see that the backdrop of the modal is never removed, as the modal is never completely closed.
https://github.com/user-attachments/assets/bef7c813-ea02-450e-9b11-f2484a0d90b1
Reproduction
https://github.com/Kesmek/modal-transition-bug
Steps to reproduce
bun create qwik
- use empty projectbun i -D @qwik-ui/headless
bun start
src/routes/index.tsx
Code that fails to close modal:
System Info
Additional Information
The bug does not occur if while pressing the
<Modal.Close>
component, you keep the mouse completely still.