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

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

Merged
pi0 merged 5 commits into
nuxt:mainfrom
harlan-zw:fix/head-ensure-paused
Oct 15, 2022
Merged

fix(nuxt): avoid head dom update on same route click#8206
pi0 merged 5 commits into
nuxt:mainfrom
harlan-zw:fix/head-ensure-paused

Conversation

@harlan-zw

@harlan-zwharlan-zw commented Oct 14, 2022

Copy link
Copy Markdown
Collaborator

🔗 Linked issue

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

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

@netlify

netlifyBot commented Oct 14, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs canceled.

NameLink
🔨 Latest commit6020610
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/634ae67b07e34500085dde5a

@harlan-zwharlan-zw changed the title fix(nuxt): ensure dom updates are paused before unpausingfix(nuxt): avoid head dom update on same route clickOct 14, 2022
pi0
pi0 approved these changes Oct 15, 2022

@pi0pi0 left a comment

Copy link
Copy Markdown
Member

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 danielroeOctober 15, 2022 11:15
@pi0
pi0 merged commit c0e9f42 into nuxt:mainOct 15, 2022
@pi0pi0 mentioned this pull request Oct 18, 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.

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

3 participants

@harlan-zw@pi0@danielroe