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][2.5.8] VSlideGroup: overflow arrows do not show up if the slide group is initially invisible #14195

Closed
Goshin opened this issue Sep 26, 2021 · 0 comments
Assignees
Labels
C: VSlideGroup T: bug Functionality that does not work as intended/expected
Milestone

Comments

@Goshin
Copy link

Goshin commented Sep 26, 2021

Environment

Vuetify Version: 2.5.8
Vue Version: 2.6.11
Browsers: Chrome 94.0.4606.61
OS: Mac OS 10.15.7, Android

Steps to reproduce

  1. click the 'Show bug' button.

Expected Behavior

The overflow arrow indicators should show up with the slide group as it overflows its container v-sheet.

Actual Behavior

The arrows do not show up until click on an item.

Reproduction Link

https://codepen.io/Kohn1/pen/KKqGjme

Other comments

this.widths = {
content: content ? content.clientWidth : 0,
wrapper: wrapper ? wrapper.clientWidth : 0,
}
// https://github.com/vuetifyjs/vuetify/issues/13212
// We add +1 to the wrappers width to prevent an issue where the `clientWidth`
// gets calculated wrongly by the browser if using a different zoom-level.
this.isOverflowing = this.widths.wrapper + 1 < this.widths.content

A possible cause might be that this.isOverflowing is not correctly calculated when the element is hidden, in which case content.clientWidth would be 0. A solution I can come up with is to watch the visibility changes and re-calculate this.isOverflowing when there is a change (with Intersection Observer API or something; might sound a little heavy).

A workaround: invoke .onResize() or .setWidths() after changing visibility.

<v-btn @click="show = true; $refs.group.setWidths()">
@glen-84 glen-84 added C: VSlideGroup T: bug Functionality that does not work as intended/expected labels Sep 26, 2021
@KaelWD KaelWD self-assigned this Jun 19, 2022
@KaelWD KaelWD added this to the v2.6.x milestone Jun 19, 2022
@KaelWD KaelWD closed this as completed in 7b4db9a Jun 19, 2022
KaelWD added a commit that referenced this issue Jun 19, 2022
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