Skip to content

Commit

Permalink
Merge pull request #833 from Zadielerick/sliderGlitch
Browse files Browse the repository at this point in the history
Fixed bug in slider component where clicking it without moving the sl…
  • Loading branch information
hai-cea committed Jun 13, 2015
2 parents f6de0f5 + b9b3da1 commit 1d4367d
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 1d4367d

Please sign in to comment.