不知道這是否可以幫助... additio針對更多Android和ios跨瀏覽器兼容的最終事件審訊。如果首先觸發較低的座標,則交換變量值(或者這是計劃)。
var touch1 = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0];
var touch2 = e.originalEvent.touches[1] || e.originalEvent.changedTouches[1];
var touchX_1 = touch1.pageX || touch1.screenX, touchY_1 = touch1.pageY || touch1.screenY;
var touchX_2 = touch2.pageX || touch2.screenX, touchY_2 = touch2.pageY || touch2.screenY;
if (touchY_1 > touchY_2){ // is first touch lower than second touch ?
var shimx = touchX_1, shimy = touchY_1; // create a temporary shim
touchX_1 = touchX_2, touchY_1 = touchY_2; // copy the second touch coordinate to the first
touchX_2 = shimx, touchY_2 = shimy; // put the lower touch coordinate into the upper
}
// now touchXY_2 is the higher touch position
您是否嘗試過檢查事件的座標? –