as acceleration may not be off instantly. accelerated content makes short single over-bounce make over-bounce by dragging the finger. scroll position is settled, and there is no delta to Hint: auto-enabling after a small pause makes the start ![]() Let prevScrollTop = 0, prevTouchY, opid = 0Ĭ = on ? "touch" : null function preventScrollVerticalBounceEffect(container) )Ĭontainer.addEventListener("touchend", onTouchEnd)Ĭontainer.addEventListener("scroll", onScroll) This solution was tested on iOS 12.1.1 and has single drawback: while accelerating the scroll single over-bounce still happens as resetting the style may not cancel it immediately. ![]() This complex solution also tracks onscroll as bounce over the top makes scrollTop negative that may be tracked. ![]() The trick here is that this style is off, mobile Safari goes to ordinary scrolling and prevents over-bounce - alas, it is not able to cancel ongoing drag. Try this JS solution that toggles webkitOverflowScrolling style.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |