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

fix(nuxt): avoid head dom update on same route click #8206

Merged
merged 5 commits into from Oct 15, 2022
Merged

fix(nuxt): avoid head dom update on same route click #8206

merged 5 commits into from Oct 15, 2022

Conversation

harlan-zw
Copy link
Collaborator

@harlan-zw harlan-zw commented Oct 14, 2022

πŸ”— Linked issue

resolves nuxt/nuxt#15159

❓ 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

There are two issues present:

  1. The DOM is updated when the user clicks a route they are already on (fixed in this PR)
  2. children is being reset before the dom re-render. Fixed here: fix: ensure tags props are immutableΒ vueuse/head#139 and is available the latest @vueuse/head RC (have bumped in this PR)

Have confirmed that either of these fixes the issue in this test.

πŸ“ Checklist

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

@codesandbox
Copy link

codesandbox bot commented Oct 14, 2022

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

@netlify
Copy link

netlify bot commented Oct 14, 2022

βœ… Deploy Preview for nuxt3-docs canceled.

Name Link
πŸ”¨ Latest commit 6020610
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/634ae67b07e34500085dde5a

@harlan-zw harlan-zw changed the title fix(nuxt): ensure dom updates are paused before unpausing fix(nuxt): avoid head dom update on same route click Oct 14, 2022
Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pi0 pi0 requested a review from danielroe October 15, 2022 11:15
@pi0 pi0 merged commit c0e9f42 into nuxt:main Oct 15, 2022
@pi0 pi0 mentioned this pull request Oct 18, 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.

useHead styles innerHTML clears when repeating router push on currently set route
3 participants