diff --git a/lib/fastclick.js b/lib/fastclick.js index 3af4f9d6..9f51fc1c 100644 --- a/lib/fastclick.js +++ b/lib/fastclick.js @@ -521,6 +521,12 @@ FastClick.prototype.onTouchEnd = function(event) { var forElement, trackingClickStart, targetTagName, scrollParent, touch, targetElement = this.targetElement; + //check for trackingClick again, otherwise fast swipe in ios will cause a ghost click; + if (this.targetElement !== this.getTargetElementFromEventTarget(event.target) || this.touchHasMoved(event)) { + this.trackingClick = false; + this.targetElement = null; + } + if (!this.trackingClick) { return true; }