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

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

Closed
greimela wants to merge 1 commit intonuxt:mainfrom
greimela:main
Closed

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

Conversation

@greimela
Copy link

@greimela greimela commented Nov 4, 2022

🔗 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.

Resolves nuxt/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

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 7382273
🔍 Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/63654170dd1afd0008a706bc

@atinux
Copy link
Member

atinux commented Nov 4, 2022

i think we worked at the same time @greimela 😄

See #8700

@greimela
Copy link
Author

greimela commented Nov 4, 2022

@atinux Oh no! 😅

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

@pi0
Copy link
Member

pi0 commented Nov 4, 2022

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

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

4 participants