Strange touch movement in the container by Safari browser

0

When I access the Safari browser on iPAD, the main container is moving like a drag effect when I touch, because of that, the image carousel does not swipe. This problem only happens on the Safari browser screen. So I've seen that some people have a problem similar to mine, the solutions I've seen, they usually crash everything, I do not want to stop scrolling the screen, so I tried to get the position of obj.clientX, obj.screenX or obj.pageX, in all cases, when dragging the scroller of the page the numbering of the X changes, hence the method locks the entire screen, there is some way to make it only block the touchmove only when the user touches the screen by dragging to the horizontal (X )?

If there is a solution in CSS, it also works.

This was the script I tried to do:

$('.webapp-v2 .content-app-webapp2').bind('touchstart', function (e) {
                var touchOp = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0];
                startscreenX = touchOp.clientX;

             });

            $('.webapp-v2 .content-app-webapp2').bind('touchmove',function(e){

               // e.preventDefault();
                var touch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0];

                // if (startpageX !== touch.pageX) {
                //     e.preventDefault();
                // }
                // if(startpageX != touch.pageX) {
                //     console.log('po_x->' + startpageX, 'pd_x->' + touch.pageX);
                // }
                // if(startpageY != touch.pageY) {
                //     console.log('po_y->' + startpageY, 'od_y->' + touch.pageY);
                // }
                // if(startscreenX != touch.screenX) {
                //     console.log('so_x->' + startscreenX, 'sd_x->' + touch.screenX);
                // }
                // if(startscreenY != touch.screenY) {
                //     console.log('so_y->' + startscreenY, 'sd_y->' + touch.screenY);
                // }
                if(startscreenX !== touch.clientX) {

                    setTimeout(function() {
                        if (startscreenX != touch.clientX) {
                            e.preventDefault();
                        }
                    },200);
                }
            });
    
asked by anonymous 13.09.2018 / 21:43

0 answers