isolated-scroll

August 17, 2016 · View on GitHub

Prevent scroll events from bubbling up to parent elements — View demo.

$ npm install --save isolated-scroll

Usage

const isolatedScroll = require('isolated-scroll');

// Isolate scrolling of selected element:
const unbindHandlers = isolatedScroll(element);

// Remove isolated scroll behaviour:
unbindHandlers();

Todo

  • Add tests.

License

MIT