Convert the horizontal mouse scrolling into vertical scroll

Hello the community :wave:

I’ve design an horizontal scrolling website, but during a user test I saw that the user tried to use mouse or trackpad horizontal scrolling, while only vertical scroll alow to scroll horinzontally. So I will like to convert the horizontal scroll to vertical to fix that issue. Any genuis know a way to do that?

My read-only link

Thank you for your help :pray:

I’ve already searched into previous posts, but no one get an anwser…

Convert horizontal trackpad scroll to vertical scroll

Vertical Scroll Horizontal movement

I’ve found the solution, paste that body coustom page code :v:

<script>
document.addEventListener('wheel', function(event) {
    if (Math.abs(event.deltaX) > Math.abs(event.deltaY)) {
        window.scrollBy(0, event.deltaX);
    } else {
        window.scrollBy(0, event.deltaY);
    }
    event.preventDefault();
}, {passive: false});
</script>