Skip to content

Prevents scroll events from overflowing down to parent elements

Notifications You must be signed in to change notification settings

bameyrick/prevent-overscrolling

Repository files navigation

prevent-overscrolling

Prevents scroll events from overflowing down to parent elements

GitHub release Build Status Codacy Badge

Features

  • Prevents overscrolling on touch devices
  • Prevents overscrolling via mouse wheel
  • Prevents overscrolling via scroll bar

Install

You can install via npm or yarn.

npm

npm install --save prevent-overscrolling

yarn

yarn add prevent-overscrolling

Usage

Importing

You can import using ES6 imports.

import { PreventOverScrolling, EnableOverScrolling } from 'prevent-overscrolling';

Example

const myScrollableElement = document.querySelector('.MyScrollableElement');

ReEnableOverScrolling(myScrollableElement);

About

Prevents scroll events from overflowing down to parent elements

Resources

Stars

Watchers

Forks

Packages

No packages published