From d63b4d736883e1fc4e00c8a6fe4fee22788108ad Mon Sep 17 00:00:00 2001 From: Jeremy Nagel Date: Thu, 14 Sep 2017 09:23:05 +1000 Subject: [PATCH] fix($range): Fix issue with overlapping points Bug when trying to move overlapping points #286 --- examples/marks.js | 2 +- src/Range.jsx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/marks.js b/examples/marks.js index 8eb717f62..68ba753b1 100644 --- a/examples/marks.js +++ b/examples/marks.js @@ -45,7 +45,7 @@ ReactDOM.render(

Range with marks

- +

Range with marks and steps

diff --git a/src/Range.jsx b/src/Range.jsx index 62fed34b2..8f1d0991e 100644 --- a/src/Range.jsx +++ b/src/Range.jsx @@ -161,7 +161,8 @@ class Range extends React.Component { const { bounds, recent } = this.state; let boundNeedMoving = closestBound; const isAtTheSamePoint = (bounds[closestBound + 1] === bounds[closestBound]); - if (isAtTheSamePoint) { + + if (isAtTheSamePoint && bounds[recent] === bounds[closestBound]) { boundNeedMoving = recent; }