mui / mui/material-ui

Issue with Fade and Transition when passing timeout.exit as undefined

Open
#46,259 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

external dependency scope: modal
Dominant language
JavaScript
Stars
99.1k
Forks
32.5k
Avg merge
2d 17h
Merged PRs (30d)
106

Description

Steps to reproduce

Steps:

  1. Open this link to live example: (https://codesandbox.io/p/devbox/customizedinputs-material-demo-mui-7-forked-96ppx4?workspaceId=ws_UJkQicAXB81GxgEvK1MtbZ)
  2. When providing slotProps.transition.timeout = {enter: 1000, exit:undefined} (which is valid according to the types)
  3. When the transition unmounts, the transition state never makes it to 'exited' (as shown in the demo)
  4. The 'transitioned' component stays on top and prevents interacting with things that were underneath.
Current behavior
  1. When the transition unmounts, the transition state never makes it to 'exited' (as shown in the demo)
  2. The 'transitioned' component stays on top and prevents interacting with things that were underneath.
Expected behavior

The visibility prop is set on the node correctly and allows interacting with things that were covered.

Context

Some of our users have raised that this same effect is happening with Modals closing, which is causing us major headaches. Whilst I've witnessed it with my own eyes, there's no timeout.exit = undefined setting in our codebase that I can find.

Any insight to what might cause the exact same behaviour, but with modals closing would be extremely valuable to me.

Your environment
npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Search keywords: Fade Transition timeout.exit as undefined

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked CodeSandbox reproduction and inspect the Fade/Transition handling for slotProps.transition.timeout when exit is undefined. Compare the unmount path with the reported modal-closing behavior. Done means the transition reaches exited, sets visibility correctly, and no longer blocks interaction with underlying content.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.