Skip to content

Commit

Permalink
fix(core): Fix vertical scrollbar dragging in rtl mode (#666)
Browse files Browse the repository at this point in the history
  • Loading branch information
GSilidis authored Apr 15, 2023
1 parent 294e78b commit cd1cfbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/simplebar-core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ export default class SimpleBarCore {
eventOffset -
(track.rect?.[this.axis[this.draggedAxis].offsetAttr] ?? 0) -
this.axis[this.draggedAxis].dragOffset;
dragPos = this.isRtl
dragPos = this.draggedAxis === 'x' && this.isRtl
? (track.rect?.[this.axis[this.draggedAxis].sizeAttr] ?? 0) -
scrollbar.size -
dragPos
Expand Down

0 comments on commit cd1cfbc

Please sign in to comment.