Skip to content
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

[Collapse] Horizontal Collapse is twitching #44940

Open
tomashauser opened this issue Jan 4, 2025 · 3 comments
Open

[Collapse] Horizontal Collapse is twitching #44940

tomashauser opened this issue Jan 4, 2025 · 3 comments
Assignees
Labels
bug 🐛 Something doesn't work component: Collapse The React component

Comments

@tomashauser
Copy link

tomashauser commented Jan 4, 2025

Steps to reproduce

Steps:

  1. Open this link to live example: https://codesandbox.io/p/sandbox/transition-group-with-horizontal-collapse-2frjrp
  2. Click on the "Add" button several times

Current behavior

In some instances a strange twitching happens. This event stretches the page, hence why there is a scrollbar for a brief moment. The card has a full width for a split second, and then it goes back to 0 width and expands slowly.

Expected behavior

The animation is smooth. There is no twitching, it starts from 0 width and expands as expected.

Context

I'm trying to achieve this exact scenario from the documentation but in a horizontal manner.

Your environment

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

Search keywords: horizontal, collapse, twitching, transition-group

@tomashauser tomashauser added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jan 4, 2025
@zannager zannager added the component: Collapse The React component label Jan 6, 2025
@ZeeshanTamboli
Copy link
Member

ZeeshanTamboli commented Jan 8, 2025

@tomashauser I can only reproduce this in CodeSandbox and StackBlitz, not locally. Here's a video where I am running it locally in dev mode:

Screen-Recording.mp4

Could it be due to the online editors running in an iframe? What's your use case? Can you test it locally in your app to see if it twitches?

@ZeeshanTamboli ZeeshanTamboli added status: waiting for author Issue with insufficient information and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jan 8, 2025
@ZeeshanTamboli ZeeshanTamboli changed the title Horizontal Collapse is twitching [Collapse] Horizontal Collapse is twitching Jan 8, 2025
@tomashauser
Copy link
Author

@tomashauser I can only reproduce this in CodeSandbox and StackBlitz, not locally. Here's a video where I am running it locally in dev mode:

Screen-Recording.mp4
Could it be due to the online editors running in an iframe? What's your use case? Can you test it locally in your app to see if it twitches?

This could be an OS thing I guess. If I download and run the sandbox app on my localhost, I get the exact same behavior (see the video).
I'm using Microsoft Windows 11 Pro 10.0.26100 N/A Build 26100. The browser version is irelevant as I'm getting this exact behavior in Edge, Mozilla and Chrome.

twitching-collapse.mp4

@github-actions github-actions bot added status: waiting for maintainer These issues haven't been looked at yet by a maintainer and removed status: waiting for author Issue with insufficient information labels Jan 8, 2025
@ZeeshanTamboli
Copy link
Member

I tested it locally after downloading the CodeSandbox and can reproduce it. I'll mark it as a bug.

@ZeeshanTamboli ZeeshanTamboli added bug 🐛 Something doesn't work and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: Collapse The React component
Projects
None yet
Development

No branches or pull requests

4 participants