ngryman / jquery.finger

:v: jQuery touch & gestures, fingers in the nose.
https://ngryman.sh/jquery.finger/
MIT License
423 stars 66 forks source link

Right click fires tap event #46

Closed CedricReichenbach closed 8 years ago

CedricReichenbach commented 8 years ago

This is especially a problem while developing and using it on desktop: One might right click an element for inspection, and an unintended action is executed.

ngryman commented 8 years ago

Yes you are totally right. I'll look into it asap.

giulianoriccio commented 8 years ago

adding this right at the begin of startHandler fixed it for me (event.which should always be 0 for touch events while for mouse events: 1 = left, 2 = middle, 3 = right):

    if (event.which > 1) {
      return;
    }
ngryman commented 8 years ago

Merged and released as 0.1.5. Thanks!