Skip to content

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

@omar-azmi

Description

@omar-azmi

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')
},

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions