Skip to content

Commit

Permalink
Slider touchmove event does not prevent default behaviour, fixes #5
Browse files Browse the repository at this point in the history
  • Loading branch information
minwe committed Nov 10, 2015
1 parent 33305f4 commit 6cdf4ec
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/js/Slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ const Slider = React.createClass({
...props
} = this.props;

// TODO: 优化 swipe,左右方向阻止默认事件,垂直方向不阻止
return (
<Touchable
{...props}
Expand All @@ -303,6 +304,7 @@ const Slider = React.createClass({
onMouseOut={this.handleMouseOut}
onSwipeLeft={this.handleSwipeLeft}
onSwipeRight={this.handleSwipeRight}
preventDefault={false}
>
<ul className={this.prefixClass('slides')}>
{React.Children.map(children, this.renderItem)}
Expand Down

0 comments on commit 6cdf4ec

Please sign in to comment.