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] bug with tabs slider #13212

Closed
smaimOK opened this issue Mar 4, 2021 · 2 comments · Fixed by #13280
Closed

[Bug Report] bug with tabs slider #13212

smaimOK opened this issue Mar 4, 2021 · 2 comments · Fixed by #13280
Labels
C: VSlideGroup T: bug Functionality that does not work as intended/expected
Milestone

Comments

@smaimOK
Copy link

smaimOK commented Mar 4, 2021

Environment

Vuetify Version: 2.4.5
Vue Version: 2.6.11
Browsers: Chrome 89.0.4389.72
OS: Windows 10

Steps to reproduce

found a problem on my site. Long haunted me, I thought the problem was in my project. The problem is this: when you the scoroll on the tabs. at some point when you cash in on the arrow, it does not behave correctly, it will hide it back and forth.
https://vuetifyjs.com/en/components/tabs/#align-with-title - here is also a problem
Then I found the same problem on your site. Click the arrows. You will see the problem.
I hope you can understand me. really looking forward to your reply.
my mail: serepuga102@gmail.com

Expected Behavior

the scroll worked well

Actual Behavior

bug

Reproduction Link

https://codesandbox.io/s/rj75pm5o1q?from-embed=&file=/src/components/TabsRow.vue:223-229

@ghost ghost added the S: triage label Mar 4, 2021
@KaelWD KaelWD added the S: needs reproduction The issue does not contain a valid reproduction label Mar 6, 2021
@elioschmutz
Copy link
Contributor

The Bug can be reproduced as following:

Markup:

<template>
  <v-container>
    <v-tabs>
      <v-tab>Item One</v-tab>
      <v-tab>Item Two</v-tab>
      <v-tab>Item Three</v-tab>
    </v-tabs>
  </v-container>
</template>

<script>
export default {
  name: "App",
};
</script>
<style lang="scss">
.v-tabs {
  padding-left: 14px;
  .v-tabs-bar {
    padding-left: 16px;
  }
}
</style>

Steps

  • Visit the Site with the markup above with Chrome
  • Set the Zoom to 110%
  • Resize the window

Sanbox to reproduce

https://codesandbox.io/s/hardcore-currying-ihcr8?file=/src/App.vue

Explanation

The bug seems to be in the VSlideGroup component of vuetify in the setWidths method.

It seems to be a rounding issue in Chrome only when calculating the clientWidth. The wrapper and the content width are different by 1px in some cases, even if they're equal. Here's an example with a console.log within the setWidths method of the VSlideGroup to show what happens while the bug is taking effect:

Bildschirmvideo.aufnehmen.2021-03-17.um.09.44.05.mov

The setWidths methods will be called in an endless loop triggered by the isOverflowing watcher which I can demonstrate with the following screen which logs where the setWidths gets called:

Bildschirmfoto 2021-03-17 um 09 46 57

In the best case, the tabs are just jumping around. In the worst case, the vue-app will fully freeze.

And here you can see the widths printed always if the setWidths method was called. You can see the difference of 1px every second time it gets called. That's the reason, why it's flickering around if the bug is taking effect:

Bildschirmfoto 2021-03-11 um 11 23 28

@smaimOK
Copy link
Author

smaimOK commented Mar 17, 2021

Thank you so much. Also, scrolling does not work correctly. What can we think of?

elioschmutz added a commit to elioschmutz/vuetify that referenced this issue Mar 17, 2021
@KaelWD KaelWD added C: VSlideGroup T: bug Functionality that does not work as intended/expected and removed S: needs reproduction The issue does not contain a valid reproduction S: triage labels Mar 17, 2021
@KaelWD KaelWD added this to the v2.4.x milestone Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VSlideGroup T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants