Skip to content

Conversation

@WITS
Copy link

@WITS WITS commented Nov 17, 2025

This ensures that the portalNode ref is reset to null when removing the portalNode element from the DOM. Without this the <Portal> doesn't properly re-add a node to the DOM when it's remounted inside of React's <Activity> component.

Next.js 16's Cache Components use <Activity> to restore UI when navigating back via history, so without this change navigating backwards in history can break portals.


Thank you for contributing to Reach UI! Please fill in this template before submitting your PR to help us process your request more quickly.

  • Use a meaningful title for the pull request. Include the name of the package modified.
  • Test the change in your own code (Compile and run).
  • Add or edit tests to reflect the change (Run with yarn test).
  • Add or edit Storybook examples to reflect the change (Run with yarn start).
  • Ensure formatting is consistent with the project's Prettier configuration.
  • Add documentation to support any new features.

This pull request:

  • Creates a new package
  • Fixes a bug in an existing package
  • Adds additional features/functionality to an existing package
  • Updates documentation or example code
  • Other

If creating a new package:

  • Make sure the new package directory contains each of the following, and that their structure/formatting mirrors other related examples in the project:
    • examples directory
    • src directory with an index.tsx entry file
    • At least one example file per feature introduced by the new package
    • Base styles in a style.css file (if needed by the new package)

@changeset-bot
Copy link

changeset-bot bot commented Nov 17, 2025

🦋 Changeset detected

Latest commit: 87bf502

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 25 packages
Name Type
@reach/portal Patch
@reach/combobox Patch
@reach/dialog Patch
@reach/popover Patch
@reach/tooltip Patch
reach-storybook Patch
@reach/alert-dialog Patch
@reach/dropdown Patch
@reach/listbox Patch
@reach/menu-button Patch
@reach/accordion Patch
@reach/alert Patch
@reach/auto-id Patch
@reach/checkbox Patch
@reach/descendants Patch
@reach/disclosure Patch
@reach/machine Patch
@reach/polymorphic Patch
@reach/rect Patch
@reach/skip-nav Patch
@reach/slider Patch
@reach/tabs Patch
@reach/utils Patch
@reach/visually-hidden Patch
@reach/window-size Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant