diff --git a/CHANGELOG.md b/CHANGELOG.md index 7aee514..34ef32d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased][] +### Fixed + +- Only emit drag end event after an object dragged, not after every mouse up + ## [1.3.2][] - 2016-11-05 ### Added diff --git a/src/index.js b/src/index.js index 6e95b9d..397b759 100644 --- a/src/index.js +++ b/src/index.js @@ -500,6 +500,10 @@ const {didMount, didUnmount} = (function getDidMountAndUnmount() { function onMouseUp({clientX, clientY}) { + if (!draggedElement) { + return; + } + cleanUpPositionLog(); const velocity = {