Page Change Issue with Autoplay or Swiper Navigation in Nuxt 3
rjacinto30 opened this issue · comments
Description
An issue occurs in egjs-flicking when using it within a Nuxt 3 application. The issue manifests as unexpected behavior when changing routes within the application, specifically:
- When Flicking's Autoplay feature is enabled.
- When swiping to change panels in the Flicking component.
Expected Behavior:
Flicking should not crash on route change in Nuxt 3, regardless of Autoplay or swiping state.
Actual Behavior:
The issue exhibits itself in various ways, depending on the scenario:
- With Autoplay enabled, and a user navigates to a new page, the whole page crashes.
- During swiping, (if the swiper is still animating, like free drag), and a user navigates to a new page, the whole page crashes.
In both cases, the user needs to force a page reload.
Reproduction Steps
- Set up a Nuxt 3 project with egjs-flicking integration.
- Create a Flicking component with Autoplay enabled.
- Implement route navigation between pages containing the Flicking component.
OR
- Set up a Nuxt 3 project with egjs-flicking integration.
- Create a Flicking component that allows swiping to change panels.
- Implement route navigation between pages containing the Flicking component.
- Attempt to swipe to change panels while navigating between routes.
Expected Result:
- Flicking should not crash on route change, regardless of Autoplay or swiping state.
Actual Result:
Page crashes. Console throws the error:
Additional Information
nuxt: 3.12.2
@egjs/vue3-flicking: 4.11.3
@egjs/flicking-plugins: 4.7.1
Browser(s) tested: Chrome, Chromium, Edge
Could be related to #785 ?