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

Using the transition property on elements inside Carousel causes items become hidden #2499

Closed
adamerose opened this issue Dec 6, 2021 · 1 comment
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@adamerose
Copy link

Codesandbox Example
https://codesandbox.io/s/primereact-test-forked-mf7qu?file=/src/index.js:1587-1614

Current behavior
When you hover over carousel items in my Codesandbox example they become hidden after their transition plays. Removing the transition css on Line 79 fixes it. Looks like it's because it's triggering p-items-hidden to appear on the p-carousel-items-container div.

Expected behavior
Using transitions on carousel children shouldn't break the carousel.

@adamerose
Copy link
Author

adamerose commented Dec 6, 2021

After more tinkering I'm noticing that the transition CSS isn't the root of the bug here... Here's a much more minimal example that still shows buggy behavior where items become hidden after I scroll right: https://codesandbox.io/s/primereact-test-forked-73uij?file=/src/index.js

Adding this to the CSS fixes it, not sure if it breaks other things but seems to work fine for me with this

.p-items-hidden .p-carousel-item {
  visibility: visible !important;
}

@mertsincan mertsincan added the Type: Bug Issue contains a defect related to a specific component. label Dec 13, 2021
@mertsincan mertsincan added this to the 8.0.0 milestone Dec 13, 2021
@mertsincan mertsincan self-assigned this Dec 13, 2021
@mertsincan mertsincan changed the title [Bug Report] Using the transition property on elements inside Carousel causes items become hidden Using the transition property on elements inside Carousel causes items become hidden Dec 13, 2021
@mertsincan mertsincan modified the milestones: 8.0.0, 7.1.0 Dec 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

No branches or pull requests

2 participants