How to prevent pull-down-to-refresh in Mobile Chrome?

Sometimes, we want to prevent pull-down-to-refresh in Mobile Chrome.

In this article, we’ll look at how to prevent pull-down-to-refresh in Mobile Chrome.

How to prevent pull-down-to-refresh in Mobile Chrome?

To prevent pull-down-to-refresh in Mobile Chrome, we can set the overscroll-behavior-y CSS property to contain.

For instance, we write:

html,
body {
    overscroll-behavior-y: contain;
}

to disable pull to refresh in mobile Chrome for the whole page.

Conclusion

To prevent pull-down-to-refresh in Mobile Chrome, we can set the overscroll-behavior-y CSS property to contain.