Skip to content

Commit

Permalink
fix(VTabs): set correct offset on touchend with rtl
Browse files Browse the repository at this point in the history
fixes #8116
  • Loading branch information
johnleider committed Jul 31, 2019
1 parent d14dcc9 commit 1565a8e
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions packages/vuetify/src/components/VSlideGroup/VSlideGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,20 @@ export const BaseSlideGroup = mixins<options &
content.style.setProperty('transition', null)
content.style.setProperty('willChange', null)

/* istanbul ignore else */
if (this.scrollOffset < 0 || !this.isOverflowing) {
this.scrollOffset = 0
} else if (this.scrollOffset >= maxScrollOffset) {
this.scrollOffset = maxScrollOffset
if (this.$vuetify.rtl) {
/* istanbul ignore else */
if (this.scrollOffset > 0 || !this.isOverflowing) {
this.scrollOffset = 0
} else if (this.scrollOffset <= -maxScrollOffset) {
this.scrollOffset = -maxScrollOffset
}
} else {
/* istanbul ignore else */
if (this.scrollOffset < 0 || !this.isOverflowing) {
this.scrollOffset = 0
} else if (this.scrollOffset >= maxScrollOffset) {
this.scrollOffset = maxScrollOffset
}
}
},
overflowCheck (e: TouchEvent, fn: (e: TouchEvent) => void) {
Expand Down

0 comments on commit 1565a8e

Please sign in to comment.