Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

fix(nuxt): check if global transitions are activated for scroll behavior #8700

Merged
merged 3 commits into from Nov 4, 2022

Conversation

Atinux
Copy link
Member

@Atinux Atinux commented Nov 4, 2022

Resolves a regression from #8463

And resolves nuxt/nuxt#15364

Learn more in the comments from #8327

❓ Type of change

  • 🐞 Bug fix (a non-breaking change that fixes an issue)

πŸ“š Description

Regression since we need to detect if there are global transitions activated in order to listen to page:transition:finish hook. Otherwise it's never called and the scrollBehavior is inactive.

Also, since the value of the next and previous page can be undefined, using !== false was also a wrong usage.

Resolves a regression from #8463

Learn more in the comments from #8327
@codesandbox
Copy link

codesandbox bot commented Nov 4, 2022

CodeSandbox logoCodeSandbox logoΒ  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

@netlify
Copy link

netlify bot commented Nov 4, 2022

βœ… Deploy Preview for nuxt3-docs canceled.

Name Link
πŸ”¨ Latest commit ed5ef12
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/63655376ef429c000c614992

@Atinux Atinux requested a review from pi0 November 4, 2022 18:01
@pi0 pi0 changed the title fix(app): detect if global transitions are activated fix(nuxt): check if global transitions are activated for scroll behavior Nov 4, 2022
@pi0 pi0 merged commit fe433a4 into main Nov 4, 2022
@pi0 pi0 deleted the fix/router-options-regression branch November 4, 2022 18:09
@pi0 pi0 mentioned this pull request Nov 15, 2022
@danielroe danielroe added the 3.x label Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Default scroll behavior without page transition is broken in rc.13
3 participants