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

Fixed bug in slider component where clicking it without moving the sl… #833

Merged
merged 1 commit into from
Jun 13, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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