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.7] goTo results in warning when specified element is on the bottom of a page #19332

Closed
dirkbolte opened this issue Mar 4, 2024 · 3 comments
Labels
E: goTo GoTo composable T: bug Functionality that does not work as intended/expected

Comments

@dirkbolte
Copy link

Environment

Vuetify Version: 3.5.7
Vue Version: 3.4.21
Browsers: Safari 17.1.2, Google Chrome
OS: Mac OS 10.15.7

Steps to reproduce

When using goTo and specifying an element which is on the bottom of a page (or close to it), Vuetify prints a warning: [Vue warn]: Vuetify: Scroll target is not reachable

The behavior is fine if view can scrolled so that the specified element ends up on the top of the page. For any item which is closer to the bottom, an error is thrown.

Small reproduction code:

<template>
  <v-app>
    <v-container class="overflow-y-auto">
      <div v-for="i in [...Array(400).keys()]" :class="`index-${i}`">test</div>
    </v-container>
  </v-app>
</template>

<script setup>
  import { nextTick } from 'vue'
  import { onMounted } from 'vue'
  import { ref } from 'vue'
  import { useGoTo } from 'vuetify'

  const goto = useGoTo()

  onMounted(async () => {
    nextTick()
    goto('.index-399')
  })
</script>

Expected Behavior

Scrolling takes place and no warning is created.

Actual Behavior

View is scrolled but a warning is created.

Reproduction Link

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

@DumbergerL
Copy link

I have the same issue. Is there a workaround or solution yet?

@dirkbolte
Copy link
Author

I haven't found any workaround, so unfortunately as of now, we ignore the warning logs.

@KaelWD
Copy link
Member

KaelWD commented Apr 24, 2024

Fixed by #17286

@KaelWD KaelWD closed this as completed Apr 24, 2024
@KaelWD KaelWD added this to the v3.6.0 (Nebula) milestone Apr 24, 2024
@KaelWD KaelWD added T: bug Functionality that does not work as intended/expected E: goTo GoTo composable labels Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E: goTo GoTo composable T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

No branches or pull requests

3 participants