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.5.1] Bounce on scroll to bottom of the page with VAppBar set with scroll-behavior="hide" #19090

Closed
lucie1704 opened this issue Jan 23, 2024 · 4 comments · Fixed by #19921, Enterprise-CMCS/cmcs-eregulations#1360 or StrangeRanger/HThompson#22 · May be fixed by manastalukdar/manastalukdar.github.io#411
Assignees
Labels
C: VAppBar VAppBar T: bug Functionality that does not work as intended/expected
Milestone

Comments

@lucie1704
Copy link

Environment

Vuetify Version: 3.5.1
Vue Version: 3.4.7
Browsers: Chrome 120.0.0.0
OS: Windows 10

Steps to reproduce

Make a layout with v-app-bar with scroll-behavior="hide" and a scrollable v-main and scroll to bottom of the page, you will see it bounces back up. If you don't see it on the first try scroll up and back down again.

Expected Behavior

When scrolling to bottom of the page, stays at the bottom with v-app-bar hidden

Actual Behavior

Bounces back up, cannot scroll to bottom

Reproduction Link

https://play.vuetifyjs.com/#...

@YummyHOF
Copy link

YummyHOF commented Feb 3, 2024

To actually reproduce the bug, you must reach the bottom of the page before the app-bar hides (during the animation). After it has successfully hide itself, there will be no problem.

@johnleider johnleider added T: bug Functionality that does not work as intended/expected C: VAppBar VAppBar and removed S: triage labels Feb 12, 2024
@alihardan
Copy link

alihardan commented May 29, 2024

Workaround:

<script setup>
const appBarModel = ref(true);
const lastScrollY = ref(0);
window.addEventListener("scroll", () => {
  const r = window.scrollY || document.documentElement.scrollTop;
  (appBarModel.value = r < lastScrollY.value),
    (lastScrollY.value = r <= 0 ? 0 : r);
});
</script>

<template>
  <v-app-bar color="primary" v-model="appBarModel" />
</template>

Edit: Sorry, it doesn't work as I expected.

@andrew-lyashenko
Copy link

andrew-lyashenko commented Aug 15, 2024

Hi everyone! I see the problem still exists. By checking node-modules I see that the fix is there, but on the attached video you can see the behaviour of the page.

I may have missed something, any help would be appreciated.

Chrome 127.0.6533.120
Vuetify 3.6.14
Nuxt 3.10.3
OS Sonoma 14.5 (M2)

<v-app>
  <v-app-bar title="Main Toolbar">
    <template #prepend>
      <v-app-bar-nav-icon></v-app-bar-nav-icon>
    </template>
  </v-app-bar>

  <v-navigation-drawer></v-navigation-drawer>

  <v-main>
    <v-app-bar scroll-behavior="hide" title="Page Toolbar">
      <template #extension>
        <v-tabs>
          <v-tab>Test 1</v-tab>
          <v-tab>Test 2</v-tab>
          <v-tab>Test 3</v-tab>
        </v-tabs>
      </template>
    </v-app-bar>

    <v-container fluid>
      <v-row>
        <v-col v-for="i in 50" :key="i" cols="12">{{ i }}</v-col>
      </v-row>
    </v-container>
  </v-main>
</v-app>
Screen.Recording.2024-08-15.at.20.04.51.mov

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