Open nozaq opened 4 weeks ago
Similarly is happening to me with Dialog as well as Combobox listbox - passing tests on Chromium and Webkit, but failing on Firefox
This is a pretty serious issue for me, it's actually causing everything to be unclickable when closing a dialog with a backdrop before the animation completes (only in Firefox). Setting transition
to false
does seem to "fix" it for the time being, but it's not ideal.
What package within Headless UI are you using?
@headlessui/react
What version of that package are you using?
2.1.2
What browser are you using?
Firefox with Playwright
Reproduction URL
https://github.com/nozaq/headlessui-dialog-poc
README explains how to run PoC code.
Describe your issue
PoC code contains three Playwright test cases and each test case is executed on three different browser, i.e. Chromium, Firefox and Webkit.
Test results are shown below. The issue here is that Test Case 1 fails with Firefox browser.
The test fails because
<Dialog>
element withtransition
attribute is not removed from the portal node(<div data-headlessui-portal>
node ) after the transition completes, resulting in the page becoming unresponsive since the dialog element remains covering the whole screen. The test case 1 fails at this line with the following error message.The test passes when explicitly waiting the opacity of the dialog element to be 1.0 before closing it. This is confirmed by the test case 2.
I wonder if transition does not finish as expected when
<Dialog>
is closed in the middle of the entering transition from the following reason.data-enter
attribute when the dialog element is supposed to be unmounted.Additional Information
data-enter
attribute will prevent the dialog to be unmounted.Please let me know if any additional information/clarification is needed.