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

[slider] Fix RTL support #285

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

richardgreg
Copy link

Fixes #282

Signed-off-by: Richard Gregory [email protected]

Fixes airbnb#282

Signed-off-by: Richard Gregory <[email protected]>
@@ -532,7 +532,7 @@ class Rheostat extends React.Component {
}
const horizontalPercentage = ((x - sliderBox.left) / sliderBox.width) * PERCENT_FULL;
if (direction === DIRECTIONS.RTL) {
return 100 - horizontalPercentage;
return horizontalPercentage;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this change is correct. If so the horizontalPercentage is the same in RTL and LTR. The bigger issue is that react-with-direction is not auto-flipping the left/right CSS.

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

Successfully merging this pull request may close these issues.

RTL Support Doesn't Work
2 participants