Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hcodes/disable-page-scroll
Disable page scroll in browsers on mobile phones
https://github.com/hcodes/disable-page-scroll
android disable ios page scroll
Last synced: 7 days ago
JSON representation
Disable page scroll in browsers on mobile phones
- Host: GitHub
- URL: https://github.com/hcodes/disable-page-scroll
- Owner: hcodes
- License: mit
- Created: 2020-02-12T21:54:40.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-07-18T20:56:34.000Z (over 1 year ago)
- Last Synced: 2024-10-13T23:37:38.252Z (about 1 month ago)
- Topics: android, disable, ios, page, scroll
- Language: TypeScript
- Homepage: https://hcodes.github.io/disable-page-scroll/demo/
- Size: 152 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Disable Page Scroll
[![NPM version](https://img.shields.io/npm/v/disable-page-scroll.svg?style=flat)](https://www.npmjs.com/package/disable-page-scroll)
[![NPM downloads](https://img.shields.io/npm/dm/disable-page-scroll.svg?style=flat)](https://www.npmjs.com/package/disable-page-scroll)
[![Dependency Status](https://img.shields.io/david/hcodes/disable-page-scroll.svg?style=flat)](https://david-dm.org/hcodes/disable-page-scroll)Disable page scroll in browsers on mobile phones.
Especially for Mobile Safari on iOS with iframes.
## Install
```
npm i --save disable-page-scroll
```## Using
```js
import { disablePageScroll, enablePageScroll } from 'disable-page-scroll';
import 'disable-page-scroll/dist/index.css';disablePageScroll();
//...
enablePageScroll();
```## [License](./LICENSE)