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

[Bug Report][3.0.0-beta.4] VOverlay SSR hydration errors #15323

Closed
BlackYuzia opened this issue Jun 20, 2022 · 19 comments
Closed

[Bug Report][3.0.0-beta.4] VOverlay SSR hydration errors #15323

BlackYuzia opened this issue Jun 20, 2022 · 19 comments
Assignees
Labels
C: VOverlay VOverlay SSR SSR T: bug Functionality that does not work as intended/expected upstream Problem with a third party library that we may have to work around
Milestone

Comments

@BlackYuzia
Copy link

Environment

Vuetify Version: 3.0.0-beta.4
Vue Version: 3.2.37
Browsers: Chrome 102.0.0.0
OS: Windows 10

Steps to reproduce

  1. Make a component from "https://next.vuetifyjs.com/en/components/overlays/#advanced"
  2. Make v-for for cards
  3. Hover on card
  4. Profit!

Expected Behavior

Hover and overlays work's fine inside v-for

Actual Behavior

Hover didn't work, you get errors in console, also overlay didn't display.

Reproduction

<template>
    <v-row>
        <v-col cols="12" sm="6" md="4" lg="3" v-for="i in 10" :key="i">
            <v-hover v-slot="{ isHovering, props }">
                <v-card class="mx-auto" max-width="344" v-bind="props">
                    <v-img src="https://cdn.vuetifyjs.com/images/cards/forest-art.jpg"></v-img>

                    <v-card-text>
                        <h2 class="text-h6 primary--text">
                            Magento Forests
                        </h2>
                        Travel to the best outdoor experience on planet Earth. A vacation you will never forget!
                    </v-card-text>

                    <v-card-title>
                        <v-rating :value="4" dense color="orange" background-color="orange" hover class="mr-2">
                        </v-rating>
                        <span class="primary--text text-subtitle-2">64 Reviews</span>
                    </v-card-title>

                    <v-overlay :model-value="isHovering" contained scrim="#036358" class="align-center justify-center">
                        <v-btn flat>See more info</v-btn>
                    </v-overlay>
                </v-card>
            </v-hover>
        </v-col>
    </v-row>
</template>

Screenshots

This work's for one element / card.
image

This breaks for a few elements in v-for
image

image
image

PS: I a bit sleepy, I make a reproduce link a bit later.

@KaelWD KaelWD added S: needs reproduction The issue does not contain a valid reproduction and removed S: triage labels Jun 21, 2022
@KaelWD
Copy link
Member

KaelWD commented Jun 21, 2022

Works for me.

@BlackYuzia
Copy link
Author

yep, I found what problem. You should use keepalive

@BlackYuzia
Copy link
Author

BlackYuzia commented Jun 21, 2022

https://gitlab.com/BlackYuzia/nuxt-vuetify/-/tree/bug-tracker

UPD: You should run repo with npm run dev command, otherwise bug won't reproduce.

Check this repo @KaelWD

@BlackYuzia
Copy link
Author

BlackYuzia commented Jun 21, 2022

Also, you could go to - https://nuxt3.starserv.ru/bug-002
There you can find this bug too.

Wait a bit, I test again... locally I get this bug, on production no...

Oh, I found why, on production I run app by npm run build && npm run start, but locally — npm run dev
Suppose, that trouble by running in dev mode?

If you run build from repo above with dev mode npm run dev you get this bug.

UPD: Also, in local tests with npm run dev, if I remove keepalive from app.vue, then this bug didn't reproduce too.

@KaelWD KaelWD added T: bug Functionality that does not work as intended/expected SSR SSR C: VOverlay VOverlay and removed S: needs reproduction The issue does not contain a valid reproduction S: triage labels Jun 21, 2022
@KaelWD KaelWD self-assigned this Jun 21, 2022
@KaelWD KaelWD added this to the v3.0.0-beta milestone Jun 21, 2022
@KaelWD
Copy link
Member

KaelWD commented Jun 21, 2022

The actual bug is this, it has nothing to do with keep-alive or v-for
Screenshot_20220621_193106

@BlackYuzia
Copy link
Author

BlackYuzia commented Jun 21, 2022

ok, then I mistake 👀

So, this bug on SSR side?

@KaelWD
Copy link
Member

KaelWD commented Jun 21, 2022

vuejs/core#6152

@KaelWD KaelWD added the upstream Problem with a third party library that we may have to work around label Jun 21, 2022
@KaelWD KaelWD changed the title [Bug Report][3.0.0-beta.4] Overlay and Hover Won't Work Inside V-For Cycle [Bug Report][3.0.0-beta.4] VOverlay SSR hydration errors Aug 1, 2022
@raphmarot
Copy link

Is there a workaround?

@KaelWD
Copy link
Member

KaelWD commented Aug 8, 2022

@johnleider johnleider modified the milestones: v3.0.0-beta, v3.0.x Aug 17, 2022
@johnleider johnleider assigned johnleider and unassigned KaelWD Aug 17, 2022
@zylstraj
Copy link

zylstraj commented Oct 19, 2022

So the workaround for this is the v-no-ssr. Is there a fix for this with the latest version of vuetify beta or is the workaround the only way to avoid this for now? Because experiencing this same issue with the v-tooltip or same as #15307 @KaelWD

@magyarb
Copy link

magyarb commented Nov 18, 2022

Thanks for the fix! In the demo, it looks like it is solved. But if you use layouts and pages in nuxt3, the same problem appears again (and duplicates the buttons next to the v-menu in the toolbar - but also appears when using v-dialog).

@KaelWD could you please reopen this issue until it is fully fixed?

Here is the reproduction link:
https://stackblitz.com/edit/node-htkewu

@johnleider

This comment was marked as off-topic.

@vuetifyjs vuetifyjs locked as resolved and limited conversation to collaborators Nov 21, 2022
@KaelWD KaelWD reopened this Dec 6, 2022
@vuetifyjs vuetifyjs unlocked this conversation Dec 6, 2022
@KaelWD
Copy link
Member

KaelWD commented Dec 6, 2022

Related: #15951
Nuxt uses suspense which is really annoying to intercept from inside.

@uditgogoi
Copy link

uditgogoi commented Dec 6, 2022

This bug is appearing when I am trying to run the SSR application (Nuxt3 + Vuetify3) in iOS v14 screens. The v-dialog just refuses to show up. I am not using activator but I need to open the v-dialog using the v-model value. Any fix for that ?

@magyarb
Copy link

magyarb commented Dec 7, 2022

For me, <client-only> solves this problem, and is a good enough workaround until this issue is fixed.

@ThomasBerne
Copy link

It appens also on the v-select.

KaelWD added a commit that referenced this issue Dec 13, 2022
strapro added a commit to strapro/workernotes that referenced this issue Jan 29, 2023
@roseMix
Copy link

roseMix commented Feb 19, 2023

@KaelWD I'm still having this exact same issue with VOverlay on the latest version of Nuxt (3.2.2) and Vuetify (3.1.5).

<client-only> workaround works.

@tokidoki11
Copy link

Happening on v-menu as well on version 3.18

I wonder why this is closed

@johnleider
Copy link
Member

We kindly ask users to not comment on closed/resolved issues. If you believe that this issue has not been correctly resolved, please create a new issue showing the regression or create a new discussion.

If you have any questions, please reach out to us in our Discord community.

jamochl added a commit to Jerroldwyz/AntLMS that referenced this issue Sep 13, 2023
* [JL] move helpers to utils and use Nuxt auto-import
* [JL] fix eslint errors, make eslint mandatory
* [JL] run eslint again
* [JL] fix redirection bug
* [JL] fix admin navigation (Vuetify v-tooltip and v-select are inherently broken)
vuetifyjs/vuetify#15323
* [JL] fix name conflicts between mycourse and course utils
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VOverlay VOverlay SSR SSR T: bug Functionality that does not work as intended/expected upstream Problem with a third party library that we may have to work around
Projects
None yet
Development

No branches or pull requests

10 participants