react-component / slider

React Slider
https://slider.react-component.now.sh/
MIT License
3.05k stars 776 forks source link

Version 8.6.3 is a breaking version #485

Open yanmaoyuan opened 6 years ago

yanmaoyuan commented 6 years ago

We use rc-slider within a popup. The popup listens to onBlur to close. This is causing the popup to close while we are moving the slider.

onEnd = () => { this.setState({ handle: null, }, this.blur); this.removeDocumentEvents(); this.removeDocumentEvents(); this.props.onAfterChange(this.getValue()); this.props.onAfterChange(this.getValue()); } }

rakelley commented 6 years ago

This is the set of changes from #371 , introduced in 8.5.0. I've spent some time going in circles on a fix and haven't found one that universally works yet.

There are two fundamental problems:

The Range.onEnd -> createSlider.blur chain is the culprit, as it's called both when a handle is released and when the slider is blurred, and blurs all handles.

Maybe someone with more familiarity with the code base has some idea, in the mean time 8.4.1 works fine for us.