question:
in an h5 mobile page,
has such a parent-child relationship: sliding elements up and down = > left and right sliding elements = > Click elements
if there are sliding up and down (drop-down refresh), left and right sliding (rotation switching) and click events (click on item content and jump to the corresponding page) , gestures interact in the rotation area. All three events are triggered at the same time (a conflict occurs).
solution :
1, stop bubbling
if I add to the sliding element to prevent upward bubbling, prevent bubbling to the parent to trigger up and down sliding, it will appear that only triggers left and right elements, but cannot trigger up and down sliding . It is hoped that sliding up and down will not be triggered when sliding left and right. Instead of sliding around , you can never slide up and down
2 or block capture
if I add a slide element around to prevent capture down, then click event element will never trigger click event
sample illustration:
problem solving: how to keep the three events independent and do not affect each other