Skip to content

Commit

Permalink
fix: Scroll working in RTL
Browse files Browse the repository at this point in the history
  • Loading branch information
joaopedro.ferreira committed Dec 29, 2021
1 parent 6a43ec1 commit fcae298
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/handleScroll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ export const handleScroll = (
sourceDelta: number,
noOverscroll: boolean
) => {
const delta = sourceDelta;
const delta = axis === 'h' && document.dir === 'rtl' ? sourceDelta * -1 : sourceDelta;

// find scrollable target
let target: HTMLElement = event.target as any;
const targetInLock = endTarget.contains(target);
Expand Down

0 comments on commit fcae298

Please sign in to comment.