Skip to content

[Nuxt 3] Slides appear all at once without spacing on initial page load #437

@michaelprys

Description

@michaelprys

I'm using a route transition and when I refresh the page, I can see how slides appear all at once without spacing, and after the page is fully loaded they fall into place and are displayed correctly. I suppose the slider may be initializing before all elements and styles are fully loaded and applied, leading to incorrect spacing and layout initially. I tried putting the logic in onMounted and using nextTick, but it freezes the carousel instead.

Reproduction of the issue:
https://stackblitz.com/edit/nuxt-starter-ubrvzh?file=app.vue

Steps to reproduce:

If you don't use a route transition, select throttling profile like 'Slow 4G' in the 'Network' section of the browser and reload the page to see the issue.

Same issue is posted on nuxt-keen-slider github page: modbender/nuxt-keen-slider#2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions