Skip to content

Horizontal scroll not detected correctly in RTL mode (simplebar-react@3.3.2) #729

@MohammadMahdiHeshmati

Description

@MohammadMahdiHeshmati

Hello,

First of all, thank you for your great work on simplebar-react.
I noticed a bug when using it in an RTL layout with horizontal scrolling.

When the container direction is set to rtl, the horizontal scrollbar track doesn’t properly detect or synchronize the scroll position. As a result, the content and scrollbar become desynchronized or move in the wrong direction.

Steps to reproduce:

  1. Create a horizontal scroll container using SimpleBarReact
  2. Set dir="rtl"
  3. Try to scroll horizontally
  4. The scrollbar track doesn’t behave correctly

Expected behavior:
The scrollbar should correctly detect and reflect the scroll position in RTL mode.

Additional context:
Vertical scrolling works fine in RTL mode — the issue only occurs with horizontal scrolling.
It seems related to how scroll positions are calculated or mirrored for RTL.

Environment:

Software Version
simplebar-react 3.3.2

Thank you 🙏

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