Skip to content
This repository has been 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
wants to merge 1 commit into from

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