You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixed a critical bug where the inline scale style was not properly restored after measuring popup content dimensions in usePopupAutoResize. When switching between detached triggers, the scale was left at 1, which broke CSS scale transitions during exit animations. The fix changes restoreMeasurementOverrides() to restoreMeasurementOverridesIncludingScale() on line 167, ensuring the scale property is restored along with position and transform. Tests were added for all three affected components (Tooltip, Popover, PreviewCard) to verify the scale style is properly cleared after trigger switches.
Confidence Score: 5/5
This PR is safe to merge with minimal risk
The change is a simple one-line fix that correctly restores the scale property after measurement. The fix is well-targeted, addresses the root cause, and includes comprehensive test coverage across all affected components.
No files require special attention
Important Files Changed
Filename
Overview
packages/react/src/utils/usePopupAutoResize.ts
Fixed critical bug where scale style was not restored after measuring content, breaking CSS transitions when switching between detached triggers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed restoration of
scaleafter it's forcibly set to1when measuring content dimensions inusePopupAutoresize.Closes #3804