stopPropagation() with tap event

后端 未结 5 1937
[愿得一人]
[愿得一人] 2021-02-15 02:12

I\'m using hammer.js and it appears that I event.stopPropagation() doesn\'t work with tap event.

If I click on the child, the associated event is triggered

5条回答
  •  半阙折子戏
    2021-02-15 03:00

    I had a similar problems with the touch events.

    I solved it by using

    return false;
    

    which is the same as calling e.preventDefault(); e.stopPropagation();

提交回复
热议问题