-
-
Notifications
You must be signed in to change notification settings - Fork 2k
(fix/modal) #6076
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
base: canary
Are you sure you want to change the base?
(fix/modal) #6076
Conversation
- Removed scale transforms from modal animation to prevent input rendering glitches in certain browsers - Ensured modal portal uses document.body for consistent rendering across environments Closes heroui-inc#5976
- Removed scale transforms from modal animation to prevent input rendering glitches in certain browsers - Ensured modal portal uses document.body for consistent rendering across environments Closes heroui-inc#5976
🦋 Changeset detectedLatest commit: afce1eb The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
|
Someone is attempting to deploy a commit to the HeroUI Inc Team on Vercel. A member of the Team first needs to authorize it. |
@heroui/accordion
@heroui/alert
@heroui/autocomplete
@heroui/avatar
@heroui/badge
@heroui/breadcrumbs
@heroui/button
@heroui/calendar
@heroui/card
@heroui/checkbox
@heroui/chip
@heroui/code
@heroui/date-input
@heroui/date-picker
@heroui/divider
@heroui/drawer
@heroui/dropdown
@heroui/form
@heroui/image
@heroui/input
@heroui/input-otp
@heroui/kbd
@heroui/link
@heroui/listbox
@heroui/menu
@heroui/modal
@heroui/navbar
@heroui/number-input
@heroui/pagination
@heroui/popover
@heroui/progress
@heroui/radio
@heroui/ripple
@heroui/scroll-shadow
@heroui/select
@heroui/skeleton
@heroui/slider
@heroui/snippet
@heroui/spacer
@heroui/spinner
@heroui/switch
@heroui/table
@heroui/tabs
@heroui/toast
@heroui/tooltip
@heroui/user
@heroui/react
@heroui/system
@heroui/system-rsc
@heroui/theme
@heroui/use-aria-accordion
@heroui/use-aria-accordion-item
@heroui/use-aria-button
@heroui/use-aria-link
@heroui/use-aria-modal-overlay
@heroui/use-aria-multiselect
@heroui/use-aria-overlay
@heroui/use-callback-ref
@heroui/use-clipboard
@heroui/use-data-scroll-overflow
@heroui/use-disclosure
@heroui/use-draggable
@heroui/use-form-reset
@heroui/use-image
@heroui/use-infinite-scroll
@heroui/use-intersection-observer
@heroui/use-is-mobile
@heroui/use-is-mounted
@heroui/use-measure
@heroui/use-pagination
@heroui/use-real-shape
@heroui/use-ref-state
@heroui/use-resize
@heroui/use-safe-layout-effect
@heroui/use-scroll-position
@heroui/use-ssr
@heroui/use-theme
@heroui/use-update-effect
@heroui/use-viewport-size
@heroui/aria-utils
@heroui/dom-animation
@heroui/framer-utils
@heroui/react-rsc-utils
@heroui/react-utils
@heroui/shared-icons
@heroui/shared-utils
@heroui/stories-utils
@heroui/test-utils
commit: |
wingkwong
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically same comments from the previous one.
- please share a minimal reproducible sandbox for the original issue so that we can compare it with your PR changes
- 1 check failed. please take a look.
- update this PR with a meaningful title
|
hi please check in description i added the heading as well as sandbox link it is and intermittent issue |
|
your sandbox is not accessible. Also doc build failed. |
|
i change the status of sandbox public |
…is DOM is available
…is DOM is available
|
please review again |
|
please review it |
|
I think this is an issue in react-aria, see this issue where I provided a patch that fixes it: adobe/react-spectrum#8786 |
🐛 Fix: Modal inputs not visually updating (Intermittent)
📝 Description
This PR fixes an intermittent rendering issue where input state changes inside the Modal component were not visually reflected, even though React state updates and component re-renders were occurring correctly.
The issue primarily affected modal content rendered via portals and animations, causing DOM updates to appear “frozen” in certain environments and browsers.
⛳️ Current behavior (before fix)
Inputs inside Modal did not visually update despite state changes.
React state updates and re-renders were confirmed via console.log.
Affected components included:
Native HTML inputs (checkbox, text, etc.)
HeroUI Input and Checkbox
Button loading states and other interactive elements
Behavior was intermittent and environment-dependent.
🔁 Reproduction (intermittent)
CodeSandbox demonstrating the issue:
👉 https://codesandbox.io/p/devbox/heroui-modaltest-forked-lvtc3q?file=%2Fsrc%2FApp.js&workspaceId=ws_AzzPzxqhuZ9Tf5xvGNfXn8
🚀 New behavior (after fix)
Modal inputs now reliably update visually in response to state changes.
Removed scale-based transforms from modal animations to avoid rendering glitches in certain browsers.
Ensured the modal portal consistently mounts to document.body for stable rendering across environments.
💣 Is this a breaking change?
No
📝 Additional Information
Animation fix
packages/components/modal/src/modal-transition.ts
→ Removed scale transforms from modal animations.
Portal fix
packages/components/modal/src/modal.tsx
→ Updated portal container fallback to always use document.body.
Includes a changeset for automated changelog generation.
Closes #5976
🧪 Testing
Existing Modal component tests pass.
Manually verified that:
Native inputs update correctly
HeroUI form components reflect state changes
Button loading states update as expected
Confirmed fix resolves the intermittent rendering issue in modal contexts.