janpaepke / ScrollMagic

The javascript library for magical scroll interactions.
http://ScrollMagic.io
Other
14.89k stars 2.17k forks source link

Safari "overscroll-behavior: none" stucks #1026

Open TYGUZY opened 5 months ago

TYGUZY commented 5 months ago

Based on a suggestion on stackoverflow I have created an horizontal scroller:

var controller = new ScrollMagic.Controller();
var scrollHorizontal = new TimelineLite();

scrollHorizontal.to("#scrollHorizontal", 1, {x:'-85%'})

var horizontalScroll = new ScrollMagic.Scene({
      triggerElement: "#scrollHorizontal",
      triggerHook: 'onLeave',
      duration: 8000,
      offset: 0,
      loglevel: 1
    }).setPin("#scrollHorizontal").setTween(scrollHorizontal).addTo(controller);

No issues in Firefox and Chrome. In Safari when "overscroll-behavior" is set to "none", the updates stop when the triggerElement reaches the start point and the scrolling completely freezes. No errors in the console and the updates also stop. When the "pointer-events" are set to "none" for "#scrollHorizontal" it works again, but is not usable for my case.