Permalink
Browse files

ensure start & end targets are the same.

  • Loading branch information...
1 parent e6fb8d8 commit 82cf1f09e85911b9149e3b71886d0e6d408b6486 @ngryman committed Mar 16, 2013
Showing with 4 additions and 1 deletion.
  1. +3 −0 src/jquery.finger.js
  2. +1 −1 test/jquery.finger_test.js
View
@@ -78,6 +78,9 @@
f = $.data(this, 'finger'),
evtName;
+ // ensures start target and end target are the same
+ if (event.target !== data.start.target) return;
+
// tap-like events
if (!data.motion) {
evtName = now - data.start.time < $.Finger.pressDuration ?
@@ -187,7 +187,7 @@
it('should not fire when another target is under the pointer before release', function() {
var handler = sinon.spy();
- this.$elems.on('tap', handler);
+ $('body').on('tap', '.touchme', handler);
this.tapStart();
this.cursorPos.y = 100;
this.tapEnd();

0 comments on commit 82cf1f0

Please sign in to comment.