Touchpad event detection with two fingers scrolling on MacOs in Safari

We are working on scrolling the site. Our site has a horizontal orientation, and page resizing is developing so that there is no vertical scrolling of the browser on any page. But when we tested our site on a MacOs machine, we have an error with two fingers scrolling in browsers that are built on the WebKit engine (for example, Safari).

In the scrolling process, we get the following results (Mac Safari browser):

1) if I scroll up / down with two fingers on the touchpad page up / down (but there is no vertical scroll of the browser), and only then the page moves / scrolls left / right, as we need;

2) if I scroll left / right with two fingers on the touch panel, the browser tabs start to scroll / scroll, we need this action to scroll our page left / right or to prevent this action.

Therefore, we need to catch the touchpad events with two fingers scrolling on MacOs in browsers that are built on the WebKit engine.

Maybe someone knows How can we detect / listen to the events of the touchpad / trackpad (two fingers on the touchpad) using javascript?

Thank.

+5
source share

All Articles