css – Overflow And Height Disables Smooth Scrolling on Safari


I use position: sticky and overflow: hidden on my project. To prevent the problem of sticky position not working, I used the solution in this article: specifying a height to the parent with overflow.

body {
  height: 100%;
  overflow-x: hidden;
}

This works well on all desktop browsers and mobile phones, except that on Safari for iOS, the webpage behaves strangely to scrolling. The overflow-x value is applied correctly, but smooth scrolling doesn’t work.

On normal pages, the page is supposed to scroll more even when I release my fingers. However, on my page, the scrolling stops instantly as I release my fingers.

Is there a way I can stop this behavior, or another way to achieve overflow with sticky?



Source link

Latest articles

Related articles

Leave a reply

Please enter your comment!
Please enter your name here