Touch event not working on IOs device (Safari browser)

I have built a site (https://caviarkaspia.webflow.io/) where you can navigate aroud the page with swiping thanks to a dragging script, all works fine but in IOs devices is it not working for Safari browsers, here is the code, any ideas on where to look at?

var curYPos = 0;
var curXPos = 0;
var curDown = false;

$(document).on("touchmove", function (event) {
  if (curDown === true) {
    var touchLocation = event.targetTouches[0];
    $(document).scrollTop(parseInt($(document).scrollTop() + (curYPos - touchLocation.pageY)));
    $(document).scrollLeft(parseInt($(document).scrollLeft() + (curXPos - touchLocation.pageX)));
       
}});

$(document).on("touchstart", function (e) { curDown = true; curYPos = e.targetTouches[0].pageY; curXPos = e.targetTouches[0].pageX; e.preventDefault(); });
$(window).on("touchleave", function (e) { curDown = false; })

$(window).on("touchend", function (e) { curDown = false;});

Thanks!

Today I came across a similar problem for my site. Turns out “pageX” and “pageY” are supported by every browser except Safari. Hope it helps!

Your site looks awesome by the way!