Skip to content

Commit

Permalink
Fixed bug in slider component where clicking it without moving the sl…
Browse files Browse the repository at this point in the history
…ider would cause glitch jump
  • Loading branch information
Zadielerick committed Jun 12, 2015
1 parent dd1bb48 commit b9b3da1
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/slider.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ var Slider = React.createClass({
<span className="mui-input-description">{this.props.description}</span>
<span className="mui-input-error">{this.props.error}</span>
<div style={sliderStyles}
onTouchTap={this._onClick}
onFocus={this._onFocus}
onBlur={this._onBlur}
onMouseOver={this._onMouseOver}
Expand Down Expand Up @@ -294,16 +293,6 @@ var Slider = React.createClass({
this.setValue(0);
},

_onClick: function (e) {
this._tabPressed = false;
// let draggable handle the slider
if (this.state.dragging || this.props.disabled) return;
var node = React.findDOMNode(this.refs.track);
var boundingClientRect = node.getBoundingClientRect();
var offset = e.clientX - boundingClientRect.left;
this._updateWithChangeEvent(e, offset / node.clientWidth);
},

_onFocus: function (e) {
this.setState({focused: true});
if (this.props.onFocus) this.props.onFocus(e);
Expand Down

0 comments on commit b9b3da1

Please sign in to comment.