From 806685ab4d13028149b3ea3bc6a90f9028f760ce Mon Sep 17 00:00:00 2001 From: Chris Vaszauskas Date: Mon, 24 Oct 2016 11:49:56 -0500 Subject: [PATCH] Fix timing issue in Chrome --- src/SortableContainer/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/SortableContainer/index.js b/src/SortableContainer/index.js index fca096177..026cbfa37 100644 --- a/src/SortableContainer/index.js +++ b/src/SortableContainer/index.js @@ -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); + } } } };