-
Notifications
You must be signed in to change notification settings - Fork 610
[Portal] renders children on a detached DOM node causing measuring and autoFocus to fail #1809
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
👋🏻 Hi @Swiftwork, sorry for the late reply here and thanks for filing this! I'm going to ask our accessibility team to take a look at this and advise on whether we want to implement it. @alliethu what do you think? |
Hi! This issue has been marked as stale because it has been open with no activity for 180 days. You can comment on the issue or remove the stale label to keep it open. If you do nothing, this issue will be closed in 7 days. |
Not stale |
Sorry for the delay on this, @Swiftwork. Are you able to share any details about the desired behavior you're trying to accomplish in your application? It'd also be helpful if you could share a reproduction of the problem; you can fork this sandbox template if you'd like: https://codesandbox.io/s/primer-react-qyyepc. Thanks! |
Hi! This issue has been marked as stale because it has been open with no activity for 180 days. You can comment on the issue or remove the stale label to keep it open. If you do nothing, this issue will be closed in 7 days. |
Describe the bug
The current way the Portal is written, mounts its children on a detached node. This causes children that need to use
autoFocus
or measure themselves to fail.To Reproduce
Steps to reproduce the behavior:
Expected behavior
Possible change to the way children are rendered, taking into account the different drawbacks detailed here reactjs/react.dev#272 (comment) and an update to the documentation outlining which method has been chosen. Potentially introducing a prop if possible to switch between mounting styles.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Kind Regards
Erik Hughes
The text was updated successfully, but these errors were encountered: