Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Page freezes when anchor linking #94

Open
palfaro91 opened this issue Nov 11, 2024 · 0 comments
Open

Page freezes when anchor linking #94

palfaro91 opened this issue Nov 11, 2024 · 0 comments

Comments

@palfaro91
Copy link

palfaro91 commented Nov 11, 2024

I am using the Nuxt plugin but I figured I could post the issue here since it's only wrapping this component. I am using it in the following way:

// Block.vue

<div v-if="position === 0" > 
  some content that renders above the fold that should not be lazy loaded
</div>
<NuxtLazyHydrate
      v-else
      :when-visible="{ rootMargin: '50px', threshold: 0.1 }"
      @hydrated="componentHydrated" // does not run either when anchor linking
    >
    <my-component />
 </NuxtLazyHydrate>

The parent component renders it like this

// Parent.vue
<div>
  <Block 
    v-for="(loaded, blockIdx) in loadedComponents"
    :key="blockIdx"
    :position="blockIdx"
    />
</div>

When I click on an anchor link the page freezes and becomes unresponsive. Any idea why it would freeze the page when anchor linking?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant