-
Notifications
You must be signed in to change notification settings - Fork 564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Listbox] ListboxPopover portal immediately closes first time it's opened within a Dialog. ( React 17+) #736
Comments
If someone could point me in the right direction on how to debug this I could take a stab at it. Haven't gotten anywhere yet. |
It seems to be related to Edit: it also works if you pass |
@loque I can not express how thankful I am for the workaround, thank you so very much! |
@einaralex no need! Although I meant to add information for further exploration, I really don't know the possible consequences of doing that. |
The consequences are that your Dialog is no longer accessible if you do that, hence why the prop tells you that it's dangerous! You can implement your own focus lock but that's a lot of work. I'll investigate this. |
I'm also afraid there's another bug in your example: all options except for Popeye's are invalid and should not be selectable. We'll make sure to tackle that in the next release too 馃 |
So it's been a while, but I did dig pretty deep into this with a similar issue for |
馃悰 Bug report
Current Behavior
This seems to be fine in older versions of React, not working in 17.0.1
Expected behavior
Reproducible example
CodeSandbox Template
You can replicate this by using the buttons in the dialog toggling the portal to true.
It should be fine with portal set to false.
Suggested solution(s)
Additional context
Unit test:
This test will fail.
Changing portal to
portal={false}
聽will pass.Your environment
The text was updated successfully, but these errors were encountered: