Skip to content

Commit

Permalink
fix(VSlideGroup): account for inverted RTL scrolling
Browse files Browse the repository at this point in the history
fixes #14529
  • Loading branch information
KaelWD committed Dec 27, 2021
1 parent 24ccd88 commit 092fceb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/vuetify/src/components/VSlideGroup/VSlideGroup.ts
Expand Up @@ -216,13 +216,17 @@ export const BaseSlideGroup = mixins<options &
// and need to be recalculated
isOverflowing: 'setWidths',
scrollOffset (val) {
const scroll =
if (this.$vuetify.rtl) val = -val

let scroll =
val <= 0
? bias(-val)
: val > this.widths.content - this.widths.wrapper
? -(this.widths.content - this.widths.wrapper) + bias(this.widths.content - this.widths.wrapper - val)
: -val

if (this.$vuetify.rtl) scroll = -scroll

this.$refs.content.style.transform = `translateX(${scroll}px)`
},
},
Expand Down

0 comments on commit 092fceb

Please sign in to comment.