vuetify: [Bug Report][3.0.0] V-App-Bar Collapse On Reload Page

Environment

Vuetify Version: 3.0.0-beta.3 Vue Version: 3.2.36 Browsers: Chrome 102.0.0.0 OS: Windows 10

Steps to reproduce

  1. You should run server (npm install && npm run dev OR npm install && npm run build && npm run start)
  2. Open / page
  3. Reload page
  4. Look at app bar
  5. Bar collapse for a few seconds (in run dev mode this collapse a bit longer)

Expected Behavior

App bar didn’t collapse or something, duo page reload

Actual Behavior

Bar collapse on every page reload. After a few seconds, bar return to valid position. If you disable javascript, app bar didn’t return to required position.

Reproduction Link

https://gitlab.com/BlackYuzia/nuxt-vuetify

Screenshots

Collapse example: image

Un Collapsed after a few seconds: image

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 12
  • Comments: 22 (8 by maintainers)

Commits related to this issue

Most upvoted comments

Working on it. Since we use TSX, Vue 3.4 requires changes on our end.

This should be better on newer versions, but we’re still waiting on upstream.

This is the workaround I made using layouts

inside your template v-app v-if=“!loading” etc…

<script setup> const loading = ref(true) onMounted(() => { loading.value = false }) </script>

Any news for this ?

If you’re wrapping the whole page in <client> you might as well just disable ssr entirely.

I have the same issue working on nuxt@3.6.3 and vuetify@3.3.8 Is there any workaround?

try using <client></client>

https://github.com/vuejs/core/pull/7290 is released in vue 3.4 rc.1 Maybe it can be fixed now?

Still waiting … @cheetamaru workaround is working, but it is a hack …

Workaround for height collapsing:

<template>
    <div>
        <v-app>
            <v-app-bar ... style="width: 100%">
            ...
            </v-app-bar>
            <v-fade-transition leave-absolute>
                <div v-if="isExtraSpaceAdded" style="height: 48px" />
            </v-fade-transition>
            ...
        </v-app>
    </div>
</template>

<script setup>
const isExtraSpaceAdded = ref(true)

onMounted(() => {
  isExtraSpaceAdded.value = false
})
</script>

height: 48px is a heigth value of the v-app-bar.

Hope this bug will be fixed soon.

I have the same issue working on Nuxt 3 and Vuetify 3.0.0-beta.3 Is there any workaround ? I tried to use the <Suspense> but it’s not working in Nuxt, I tried in layouts and App.vue as well

Cheers