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

onSlideStart is not called when drag starts from track click #112

Open
jschen5 opened this issue Apr 30, 2020 · 3 comments
Open

onSlideStart is not called when drag starts from track click #112

jschen5 opened this issue Apr 30, 2020 · 3 comments

Comments

@jschen5
Copy link

jschen5 commented Apr 30, 2020

Problem or feature description:

onSlideStart is not called if the drag starts from clicking on the track or rail.

Steps to reproduce (for problems):

Bind an onSlideStart and onSlideEnd handler on a slider. Clicking on the rail or track does not call onSlideStart, but it does call onSlideEnd. This seems to be because onSlideStart is only called onMouseDown of a handle, even though a drag can start from the track itself.

Possible solution:

Not sure what the best thing to do here is, but I feel like we could just call onSlideStart in the track/rail click handler once we've moved the handles here.

Versions (for problems):

React-Compound-Slider: 2.5.0 (and most likely 3.0.0-beta.1)

@jschen5
Copy link
Author

jschen5 commented Apr 30, 2020

Made a PR that adds this behavior #113

@sghall
Copy link
Owner

sghall commented May 6, 2020

Ahh, I see. I just looked at the PR. Yeah, I get what you're saying. I'll take a look at this.

@jschen5
Copy link
Author

jschen5 commented May 6, 2020

Just saw the comment you left in #113. That makes sense! I'll update the pr and fork one of the demos as well.

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

2 participants