Skip to content

Conversation

@gau9811
Copy link

@gau9811 gau9811 commented Jan 1, 2026

🐛 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.

GitHub Copilot added 3 commits January 1, 2026 22:28
- 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
@gau9811 gau9811 requested a review from jrgarciadev as a code owner January 1, 2026 17:07
@changeset-bot
Copy link

changeset-bot bot commented Jan 1, 2026

🦋 Changeset detected

Latest commit: afce1eb

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

This PR includes changesets to release 3 packages
Name Type
@heroui/modal Patch
@heroui/drawer Patch
@heroui/react 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

@vercel
Copy link

vercel bot commented Jan 1, 2026

Someone is attempting to deploy a commit to the HeroUI Inc Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Jan 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
heroui Ready Ready Preview, Comment Jan 4, 2026 5:18pm
heroui-sb Ready Ready Preview, Comment Jan 4, 2026 5:18pm

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 2, 2026

Open in StackBlitz

@heroui/accordion

npm i https://pkg.pr.new/@heroui/accordion@6076

@heroui/alert

npm i https://pkg.pr.new/@heroui/alert@6076

@heroui/autocomplete

npm i https://pkg.pr.new/@heroui/autocomplete@6076

@heroui/avatar

npm i https://pkg.pr.new/@heroui/avatar@6076

@heroui/badge

npm i https://pkg.pr.new/@heroui/badge@6076

@heroui/breadcrumbs

npm i https://pkg.pr.new/@heroui/breadcrumbs@6076

@heroui/button

npm i https://pkg.pr.new/@heroui/button@6076

@heroui/calendar

npm i https://pkg.pr.new/@heroui/calendar@6076

@heroui/card

npm i https://pkg.pr.new/@heroui/card@6076

@heroui/checkbox

npm i https://pkg.pr.new/@heroui/checkbox@6076

@heroui/chip

npm i https://pkg.pr.new/@heroui/chip@6076

@heroui/code

npm i https://pkg.pr.new/@heroui/code@6076

@heroui/date-input

npm i https://pkg.pr.new/@heroui/date-input@6076

@heroui/date-picker

npm i https://pkg.pr.new/@heroui/date-picker@6076

@heroui/divider

npm i https://pkg.pr.new/@heroui/divider@6076

@heroui/drawer

npm i https://pkg.pr.new/@heroui/drawer@6076

@heroui/dropdown

npm i https://pkg.pr.new/@heroui/dropdown@6076

@heroui/form

npm i https://pkg.pr.new/@heroui/form@6076

@heroui/image

npm i https://pkg.pr.new/@heroui/image@6076

@heroui/input

npm i https://pkg.pr.new/@heroui/input@6076

@heroui/input-otp

npm i https://pkg.pr.new/@heroui/input-otp@6076

@heroui/kbd

npm i https://pkg.pr.new/@heroui/kbd@6076

@heroui/link

npm i https://pkg.pr.new/@heroui/link@6076

@heroui/listbox

npm i https://pkg.pr.new/@heroui/listbox@6076

@heroui/menu

npm i https://pkg.pr.new/@heroui/menu@6076

@heroui/modal

npm i https://pkg.pr.new/@heroui/modal@6076

@heroui/navbar

npm i https://pkg.pr.new/@heroui/navbar@6076

@heroui/number-input

npm i https://pkg.pr.new/@heroui/number-input@6076

@heroui/pagination

npm i https://pkg.pr.new/@heroui/pagination@6076

@heroui/popover

npm i https://pkg.pr.new/@heroui/popover@6076

@heroui/progress

npm i https://pkg.pr.new/@heroui/progress@6076

@heroui/radio

npm i https://pkg.pr.new/@heroui/radio@6076

@heroui/ripple

npm i https://pkg.pr.new/@heroui/ripple@6076

@heroui/scroll-shadow

npm i https://pkg.pr.new/@heroui/scroll-shadow@6076

@heroui/select

npm i https://pkg.pr.new/@heroui/select@6076

@heroui/skeleton

npm i https://pkg.pr.new/@heroui/skeleton@6076

@heroui/slider

npm i https://pkg.pr.new/@heroui/slider@6076

@heroui/snippet

npm i https://pkg.pr.new/@heroui/snippet@6076

@heroui/spacer

npm i https://pkg.pr.new/@heroui/spacer@6076

@heroui/spinner

npm i https://pkg.pr.new/@heroui/spinner@6076

@heroui/switch

npm i https://pkg.pr.new/@heroui/switch@6076

@heroui/table

npm i https://pkg.pr.new/@heroui/table@6076

@heroui/tabs

npm i https://pkg.pr.new/@heroui/tabs@6076

@heroui/toast

npm i https://pkg.pr.new/@heroui/toast@6076

@heroui/tooltip

npm i https://pkg.pr.new/@heroui/tooltip@6076

@heroui/user

npm i https://pkg.pr.new/@heroui/user@6076

@heroui/react

npm i https://pkg.pr.new/@heroui/react@6076

@heroui/system

npm i https://pkg.pr.new/@heroui/system@6076

@heroui/system-rsc

npm i https://pkg.pr.new/@heroui/system-rsc@6076

@heroui/theme

npm i https://pkg.pr.new/@heroui/theme@6076

@heroui/use-aria-accordion

npm i https://pkg.pr.new/@heroui/use-aria-accordion@6076

@heroui/use-aria-accordion-item

npm i https://pkg.pr.new/@heroui/use-aria-accordion-item@6076

@heroui/use-aria-button

npm i https://pkg.pr.new/@heroui/use-aria-button@6076

@heroui/use-aria-link

npm i https://pkg.pr.new/@heroui/use-aria-link@6076

@heroui/use-aria-modal-overlay

npm i https://pkg.pr.new/@heroui/use-aria-modal-overlay@6076

@heroui/use-aria-multiselect

npm i https://pkg.pr.new/@heroui/use-aria-multiselect@6076

@heroui/use-aria-overlay

npm i https://pkg.pr.new/@heroui/use-aria-overlay@6076

@heroui/use-callback-ref

npm i https://pkg.pr.new/@heroui/use-callback-ref@6076

@heroui/use-clipboard

npm i https://pkg.pr.new/@heroui/use-clipboard@6076

@heroui/use-data-scroll-overflow

npm i https://pkg.pr.new/@heroui/use-data-scroll-overflow@6076

@heroui/use-disclosure

npm i https://pkg.pr.new/@heroui/use-disclosure@6076

@heroui/use-draggable

npm i https://pkg.pr.new/@heroui/use-draggable@6076

@heroui/use-form-reset

npm i https://pkg.pr.new/@heroui/use-form-reset@6076

@heroui/use-image

npm i https://pkg.pr.new/@heroui/use-image@6076

@heroui/use-infinite-scroll

npm i https://pkg.pr.new/@heroui/use-infinite-scroll@6076

@heroui/use-intersection-observer

npm i https://pkg.pr.new/@heroui/use-intersection-observer@6076

@heroui/use-is-mobile

npm i https://pkg.pr.new/@heroui/use-is-mobile@6076

@heroui/use-is-mounted

npm i https://pkg.pr.new/@heroui/use-is-mounted@6076

@heroui/use-measure

npm i https://pkg.pr.new/@heroui/use-measure@6076

@heroui/use-pagination

npm i https://pkg.pr.new/@heroui/use-pagination@6076

@heroui/use-real-shape

npm i https://pkg.pr.new/@heroui/use-real-shape@6076

@heroui/use-ref-state

npm i https://pkg.pr.new/@heroui/use-ref-state@6076

@heroui/use-resize

npm i https://pkg.pr.new/@heroui/use-resize@6076

@heroui/use-safe-layout-effect

npm i https://pkg.pr.new/@heroui/use-safe-layout-effect@6076

@heroui/use-scroll-position

npm i https://pkg.pr.new/@heroui/use-scroll-position@6076

@heroui/use-ssr

npm i https://pkg.pr.new/@heroui/use-ssr@6076

@heroui/use-theme

npm i https://pkg.pr.new/@heroui/use-theme@6076

@heroui/use-update-effect

npm i https://pkg.pr.new/@heroui/use-update-effect@6076

@heroui/use-viewport-size

npm i https://pkg.pr.new/@heroui/use-viewport-size@6076

@heroui/aria-utils

npm i https://pkg.pr.new/@heroui/aria-utils@6076

@heroui/dom-animation

npm i https://pkg.pr.new/@heroui/dom-animation@6076

@heroui/framer-utils

npm i https://pkg.pr.new/@heroui/framer-utils@6076

@heroui/react-rsc-utils

npm i https://pkg.pr.new/@heroui/react-rsc-utils@6076

@heroui/react-utils

npm i https://pkg.pr.new/@heroui/react-utils@6076

@heroui/shared-icons

npm i https://pkg.pr.new/@heroui/shared-icons@6076

@heroui/shared-utils

npm i https://pkg.pr.new/@heroui/shared-utils@6076

@heroui/stories-utils

npm i https://pkg.pr.new/@heroui/stories-utils@6076

@heroui/test-utils

npm i https://pkg.pr.new/@heroui/test-utils@6076

commit: afce1eb

Copy link
Member

@wingkwong wingkwong left a 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.

  1. please share a minimal reproducible sandbox for the original issue so that we can compare it with your PR changes
  2. 1 check failed. please take a look.
  3. update this PR with a meaningful title

@gau9811
Copy link
Author

gau9811 commented Jan 2, 2026

hi please check in description i added the heading as well as sandbox link it is and intermittent issue

@gau9811 gau9811 requested a review from wingkwong January 2, 2026 14:33
@wingkwong
Copy link
Member

your sandbox is not accessible. Also doc build failed.

@gau9811
Copy link
Author

gau9811 commented Jan 2, 2026

i change the status of sandbox public

@gau9811
Copy link
Author

gau9811 commented Jan 4, 2026

please review again

@gau9811
Copy link
Author

gau9811 commented Jan 9, 2026

please review it

@christophmeise
Copy link

I think this is an issue in react-aria, see this issue where I provided a patch that fixes it: adobe/react-spectrum#8786

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.

[BUG] - Input inside modal is never updated + no state changes

4 participants