Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-scroll

Package Overview
Dependencies
Maintainers
1
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-scroll - npm Package Compare versions

Comparing version 1.1.3 to 1.2.0

lib/mixins/passive-event-listeners.js

4

lib/mixins/cancel-events.js

@@ -0,1 +1,3 @@

var addPassiveEventListener = require('./passive-event-listeners');
var events = ['mousedown', 'mousewheel', 'touchmove', 'keydown']

@@ -10,5 +12,5 @@

for(var i = 0; i < events.length; i = i + 1) {
document.addEventListener(events[i], cancelEvent);
addPassiveEventListener(document, events[i], cancelEvent);
}
}
};

@@ -0,1 +1,3 @@

var addPassiveEventListener = require('./passive-event-listeners');
var eventThrottler = function(eventHandler) {

@@ -28,3 +30,3 @@ var eventHandlerTimeout;

this.scrollSpyContainers.push(scrollSpyContainer);
scrollSpyContainer.addEventListener('scroll', eventHandler);
addPassiveEventListener(scrollSpyContainer, 'scroll', eventHandler);
}

@@ -31,0 +33,0 @@ },

{
"name": "react-scroll",
"version": "1.1.3",
"version": "1.2.0",
"description": "A scroll component for React.js",

@@ -5,0 +5,0 @@ "main": "lib",

@@ -306,2 +306,5 @@ ## React Scroll

> v1.2.0
- Now using passive event listeners.
> v1.1.0

@@ -308,0 +311,0 @@ - now possible to set initial active link on componentDidMount ( see README or examples code )

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc