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

fix: correct default scroll behavior for routes without page transition - #8701

Closed
greimela wants to merge 1 commit into
nuxt:mainfrom
greimela:main
Closed

fix: correct default scroll behavior for routes without page transition#8701
greimela wants to merge 1 commit into
nuxt:mainfrom
greimela:main

Conversation

@greimela

Copy link
Copy Markdown

🔗 Linked issue

nuxt/nuxt#15364

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

router.options.ts falsely determines that an undefined page transition is true, meaning it HAS a transition.
Whereas page.mjs correctly interprets an undefined transition as false.

This commit changes the condition in router.options.ts to consider an undefined transition as false.

Resolvesnuxt/nuxt#15364

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

Related issue: https://github.com/nuxt/framework/issues/8699
`router.options.ts` falsely thinks that an `undefined` page transition is `true`, meaning it HAS a transition.
Whereas `page.mjs` correctly interprets an `undefined` transition as `false`.
@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 commit7382273
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/63654170dd1afd0008a706bc

@atinux

Copy link
Copy Markdown
Member

i think we worked at the same time @greimela 😄

See #8700

@greimela

Copy link
Copy Markdown
Author

@atinux Oh no! 😅

But I don't mind, as long as it's getting fixed! 😉

@pi0

pi0 commented Nov 4, 2022

Copy link
Copy Markdown
Member

Thank you for the PR @greimela <3 Please keep doing it! Let's track the fix via single place in #8700

@pi0pi0 closed this Nov 4, 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

4 participants

@greimela@atinux@pi0@danielroe