Skip to content

fix(react): keep portal root last in body#3868

Open
raashish1601 wants to merge 1 commit into
tailwindlabs:mainfrom
raashish1601:contributor-01/headlessui-3836
Open

fix(react): keep portal root last in body#3868
raashish1601 wants to merge 1 commit into
tailwindlabs:mainfrom
raashish1601:contributor-01/headlessui-3836

Conversation

@raashish1601

Copy link
Copy Markdown

Summary

  • keep the shared React portal root as the last child of document.body`n- repair external DOM reordering before the next portal render
  • add a focused regression for the reordered portal-root case

Closes #3836.

Testing

  • npx prettier --write packages/@headlessui-react/src/components/portal/portal.tsx packages/@headlessui-react/src/components/portal/portal.test.tsx
  • npx jest --runInBand packages/@headlessui-react/src/components/portal/portal.test.tsx
  • git diff --check
@vercel

vercel Bot commented Mar 28, 2026

Copy link
Copy Markdown

@raashish1601 is attempting to deploy a commit to the Tailwind Labs Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant