Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.
/frameworkPublic archive

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

@atinuxatinux commented Nov 4, 2022

Copy link
Copy Markdown
Member

Resolves a regression from #8463

And resolvesnuxt/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
Copy Markdown

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

@netlify

netlifyBot commented Nov 4, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs canceled.

NameLink
🔨 Latest commited5ef12
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/63655376ef429c000c614992

Comment threadpackages/nuxt/src/pages/runtime/router.options.ts Outdated
@atinux
atinux requested a review from pi0November 4, 2022 18:01
pi0
pi0 approved these changes Nov 4, 2022
@pi0pi0 changed the title fix(app): detect if global transitions are activatedfix(nuxt): check if global transitions are activated for scroll behaviorNov 4, 2022
@pi0
pi0 merged commit fe433a4 into mainNov 4, 2022
@pi0
pi0 deleted the fix/router-options-regression branch November 4, 2022 18:09
@pi0pi0 mentioned this pull request Nov 15, 2022
Sign up for freeto 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

@atinux@pi0@danielroe