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

Transition stage can get locked on 'leaving' state #21

Open
Valithor opened this issue Dec 13, 2024 · 1 comment
Open

Transition stage can get locked on 'leaving' state #21

Valithor opened this issue Dec 13, 2024 · 1 comment

Comments

@Valithor
Copy link

If during transition you click on a Link to referer route your stage will get locked on 'leaving' state.

To reproduce:
I used this transition animation, but i made it async and lazy loaded gsap https://github.com/ismamz/next-transition-router?tab=readme-ov-file#minimal-example-using-gsap

  1. transition from /page-one to /page-two
  2. while the transition is happening click a link to /page-one
  3. enter function won't trigger leaving you with opacity 0

Fix: could be worth locking transition function if page is during transition (maybe add a transition stage?).
I've solved it by tracking if theres an ongoing transition and adding "pointer-events: none" to highest dom element (could worth mentioning in docs if you don't feel like locking navigation during transition is a route you'd like to take.

@ismamz
Copy link
Owner

ismamz commented Dec 27, 2024

Hi @Valithor, I'll need to explore a bit more to find the best solution. For now, it's good that you found an alternative to solve the problem. Ideally, I would like to resolve it; it might take a bit more time, but I will revisit it in the next few weeks for a timing issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants