Skip to content
This repository was 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
pi0 merged 3 commits into
mainfrom
fix/router-options-regression
Nov 4, 2022
Merged

fix(nuxt): check if global transitions are activated for scroll behavior#8700
pi0 merged 3 commits into
mainfrom
fix/router-options-regression

Conversation

@atinux

@atinux atinux commented Nov 4, 2022

Copy link
Copy Markdown
Member

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

codesandbox Bot commented Nov 4, 2022

Copy link
Copy Markdown

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

@netlify

netlify Bot commented Nov 4, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs canceled.

Name Link
🔨 Latest commit ed5ef12
🔍 Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/63655376ef429c000c614992

Comment thread packages/nuxt/src/pages/runtime/router.options.ts Outdated
@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