Skip to content

👯‍♀️ fix: Dedupe @radix-ui/react-dismissable-layer to Unblock Body Clicks#80

Merged
danny-avila merged 1 commit into
mainfrom
fix/radix-dismissable-dedupe
Jun 18, 2026
Merged

👯‍♀️ fix: Dedupe @radix-ui/react-dismissable-layer to Unblock Body Clicks#80
danny-avila merged 1 commit into
mainfrom
fix/radix-dismissable-dedupe

Conversation

@dustinhealy

@dustinhealy dustinhealy commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Three copies of @radix-ui/react-dismissable-layer were getting installed (1.1.0 nested under react-tooltip, 1.1.1 hoisted via react-menu, 1.1.11 nested under the react-dialog 1.1.15 override). Each module copy holds its own DismissableLayerContext and originalBodyPointerEvents module variable, so when the sidebar Dropdown opens, the user clicks Settings, and the SettingsDialog mounts before the Dropdown portal has finished unmounting, the Dialog's copy snapshots document.body with the Dropdown's "none" still applied. When the Dialog later closes, its cleanup writes that stale "none" back onto the body and leaves the whole app unclickable until reload.

Pin a single shared version (1.1.11, the newest already pulled in by react-dialog 1.1.15) so all Radix packages route through one module copy with one shared layer context.

Change Type

  • Bug fix (non-breaking change which fixes an issue)

Testing

Confirmed behavior no longer present after using theme switcher, app buttons are now interactable again when closing settings dialog modal.

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have commented in any complex areas of my code
  • My changes do not introduce new warnings
  • Local unit tests pass with my changes

Note

Low Risk
Dependency-only override with no app logic changes; risk is limited to Radix overlay behavior across upgraded transitive packages.

Overview
Adds a package.json override for @radix-ui/react-dismissable-layer at 1.1.11 (with matching bun.lock updates) so Radix dialog, menu, tooltip, and related packages no longer install multiple copies of that package.

That deduplication fixes a bug where opening Settings from a sidebar dropdown while the dropdown portal is still tearing down could leave document.body with pointer-events: none after the settings dialog closes, making the app unclickable until reload.

Reviewed by Cursor Bugbot for commit b7c22a0. Bugbot is set up for automated code reviews on this repo. Configure here.

Three copies of @radix-ui/react-dismissable-layer were getting installed
(1.1.0 nested under react-tooltip, 1.1.1 hoisted via react-menu, 1.1.11
nested under the react-dialog 1.1.15 override). Each module copy holds
its own DismissableLayerContext and originalBodyPointerEvents module
variable, so when the sidebar Dropdown opens, the user clicks Settings,
and the SettingsDialog mounts before the Dropdown portal has finished
unmounting, the Dialog's copy snapshots document.body with the
Dropdown's "none" still applied. When the Dialog later closes, its
cleanup writes that stale "none" back onto the body and leaves the
whole app unclickable until reload.

Pin a single shared version (1.1.11, the newest already pulled in by
react-dialog 1.1.15) so all Radix packages route through one module
copy with one shared layer context.
@dustinhealy dustinhealy changed the title fix: dedupe @radix-ui/react-dismissable-layer to unblock body clicks 👯‍♀️ fix: Dedupe @radix-ui/react-dismissable-layer to Unblock Body Clicks Jun 18, 2026
@danny-avila danny-avila merged commit a81b81c into main Jun 18, 2026
5 checks passed
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.

2 participants