Skip to content

Commit

Permalink
Merge pull request #1 from ArialBlack/mobile-ff-dismiss-at-master
Browse files Browse the repository at this point in the history
  • Loading branch information
ArialBlack authored Jul 15, 2019
2 parents d002e9f + e9e51aa commit 02fabc6
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions js/jcf.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,13 @@
e.pointerType = origEvent.type.substr(0, 5); // "mouse" or "touch" word length
}

if (!e.pageX && !e.pageY) {
touchEventData = origEvent.changedTouches ? origEvent.changedTouches[0] : origEvent;
e.pageX = touchEventData.pageX;
e.pageY = touchEventData.pageY;
}

if (origEvent.type === 'touchend') {
lastTouch = { x: e.pageX, y: e.pageY };
}
if (origEvent.type === 'touchend') {
touchEventData = origEvent.changedTouches ? origEvent.changedTouches[0] : origEvent;
e.pageX = touchEventData.pageX;
e.pageY = touchEventData.pageY;
lastTouch = { x: e.pageX, y: e.pageY };
}

if (e.pointerType === 'mouse' && lastTouch && mouseEventSimulated(e)) {
return;
} else {
Expand Down

0 comments on commit 02fabc6

Please sign in to comment.