Skip to content

UCarousel fade transitions break after page navigation with pageTransition #4379

@mikenewbon

Description

@mikenewbon

Environment

Is this bug related to Nuxt or Vue?

Nuxt

Version

v3.1.3

Reproduction

Steps to Reproduce:

  1. Load the StackBlitz demo: https://stackblitz.com/edit/nuxtui-carousel-fade-bug
  2. Click the tabs on the carousel - notice the smooth fade transitions ✅
  3. Navigate to "Page 2" using the button
  4. Try clicking tabs on either page - fade transitions no longer work ❌
  5. The carousel now uses slide animations instead of fade

Description

I noticed that when using page transitions, the fade property of the <UCarousel> component stops working after navigating between pages. The carousel reverts to slide animations instead of fade transitions. Removing the page transitions restores correct functionality.

I looked into it with the help of Claude and found the bug was caused by VueUse's computedAsync failing during page transitions in Nuxt. I will open a PR to fix this issue!

Additional context

Expected Behavior:

Carousel fade transitions should continue working after page navigation with transitions.

Actual Behavior:

Carousel fade transitions stop working and revert to slide animations after navigating between pages that have pageTransition configured.

Workaround:

Removing pageTransition from definePageMeta() restores fade functionality even after navigation.

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingv3#1289

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions