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

Fixes #455: getThumb orientation fix for vertical sliders #456

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

Conversation

elliottkember
Copy link
Contributor

I just set trackClickable to false on my vertical slider, and suddenly I can't scrub it downwards. Upwards works okay, but scrubbing downwards is broken.

I've tracked this down to the _getThumbLeft function, which uses vertical to discern between container width and height. However, my container seems to have a "width" of its visible height – not of its visible width. So the "width" is the draggable axis of the slider?

So the X and Y values are already flipped, but the function seems to be calculating incorrectly.

When the track is clickable, this resolves itself because clicking the track automatically jumps to the right position. But without that prop, the handle isn't scrubbable in a vertical context.

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.

1 participant