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

right-to-left direction (CSS "direction: rtl") breaks DoubleScroll #18

Open
omar-azmi opened this issue Jun 19, 2021 · 0 comments
Open

Comments

@omar-azmi
Copy link

Setting the flow direction of a container (div, table, etc...) to right-to-left (via css direction: rtl) will break the functionality of the second scroll.
The problem is that with rtl enabled, the scrollLeft property initiates at 0px and goes negative as you scroll (right to left). But for left-to-right divs, such as doubleScroll-scroll-wrapper , negative scrolling is undefined.

Suggested fix:
change the direction of the doubleScroll-scroll-wrapper class to match with the direction of the thing you're attaching it to.
ie: modify the code from:

scrollCss: {
    'overflow-x': 'auto',
    'overflow-y': 'hidden',
    'height': '20px',
},

to

scrollCss: {
    'overflow-x': 'auto',
    'overflow-y': 'hidden',
    'height': '20px',
    'direction': $(this).css('direction')
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant