Skip to content

Commit

Permalink
Fix timing issue in Chrome
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvasz authored Oct 24, 2016
1 parent 139d1a8 commit 806685a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/SortableContainer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,11 @@ export default function SortableContainer(WrappedComponent, config = {withRef: f
this.manager.active = {index, collection};

if (!distance) {
this.pressTimer = setTimeout(() => this.handlePress(e), this.props.pressDelay);
if (this.props.pressDelay === 0) {
this.handlePress(e);
} else {
this.pressTimer = setTimeout(() => this.handlePress(e), this.props.pressDelay);
}
}
}
};
Expand Down

0 comments on commit 806685a

Please sign in to comment.