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] When keep-alive, the height of the padding top is increased in <v-content> Tag even when the app bar has no extend. #9797

Closed
yoonjaepark opened this issue Nov 26, 2019 · 3 comments · Fixed by skyYaga/skdvin-webapp#18, skyYaga/skdvin-webapp#21 or anyulled/reactivewebflux#5 · May be fixed by andrebaldo/python-vue-spa-boilerplate#3
Assignees
Labels
Service: Application T: bug Functionality that does not work as intended/expected
Milestone

Comments

@yoonjaepark
Copy link

Environment

Vuetify Version: 2.1.11
Last working version: 2.1.11
Vue Version: 2.5.22
Browsers: Chrome 78.0.3904.108
OS: Mac OS 10.15.1

Steps to reproduce

Both pages are keep-alive pages.
Press the button below to go to the page.

Expected Behavior

In the tag, the padding top size reinitialized.

Actual Behavior

In the tag, the padding top size is increased and not reinitialized

Reproduction Link

https://codesandbox.io/s/vue-template-wwwrb?fontsize=14&hidenavigation=1&theme=dark

@merceyz
Copy link

merceyz commented Jul 1, 2020

@johnleider The fix applied here breaks custom use of the applicationable mixin / application service. The fix makes it so that there can only be one applicationable top/left/right/bottom. Could the fix be reverted and instead use hardcoded uids for the components?

@eschirtz
Copy link

eschirtz commented Dec 1, 2020

Hey, I'm still having an issue with this.

Switching to a layout without a side-nav drawer still get's the side nav drawer margins when changing screen size (side nav drawer exists in the component I "keep-alive").

Is there a way to tell the application service that v-app instances are different? I tried adding unique key props to each, but had no luck.

Thanks

@eschirtz
Copy link

eschirtz commented Dec 1, 2020

I think I found a solution.

In the layout I use keep-alive on, I added the following lifecycle hooks

activated() {
    this.enableVuetify = true;
},
deactivated() {
    this.enableVuetify = false;
}

Then I conditionally render the app level components with a v-if directive. My understanding is that this will actually destroy those elements and allow the vuetify application service to clean up, or unregister them.

If there's a more standard or accepted way, I'd love to know, but this works for now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment