How to prevent "Pull to refresh"

Younggeun called as Jay·2024년 3월 17일

Even when overflow is set to hidden on the body, the PTR action still gets triggered when a pop-up or a modal is opened on Safari and the web view within the app.

So, how can we prevent PTR?

It's simple.

In my case, I was able to fix it by changing the overscroll-behavior style attribute for the body and html tags:

overscroll-behavior: none;

Browser compatibility:
Please note that this is supported from iOS 16 onwards.

profile
까먹을때마다 보려고 올리는 나의 기록

0개의 댓글